Good day.
I wanted to do. below the search form on the website was active, but
- only on the main page
- only in the PC version of the site
Used this script:
if(window.location.toString().indexOf('site.ru') > 1) { $(window).resize(function() { width = $(window).width(); if (width >= 991) { { $("#search").focus(); }; } }); };
Everything works, except for restrictions on one main page. If on the test site to point to a string
if(window.location.toString().indexOf('site.ru\\index.php') > 1)
then it works, but on combat project is the redirect virus: removed index.php and trailing slash, so the script runs on all pages. What can I do?