In the browser line, the link is in the form of: http://site.ru/faq.php?1231231231 or http://site.ru/faq.php?456456456456456, etc.

For the script you need greetings to the form http://site.ru/faq.php

The script itself:

<script type="text/javascript"> $('document').ready(function() { $('.navtabs li a').each(function() { if ('http://site.ru/faq.php' == window.location.href) { $(this).addClass('selected'); } }); }); </script> 

Here, instead of window.location.href, you should probably use something. How to do it?

    1 answer 1

     var realHref = window.location realHref = realHref.split('?'); var url = realHref[0]; 
    • var realHref = window.location.href Forgot href. And thanks, it helped. - ZoOM 2:17 pm