<script type="text/javascript"> $(document).ready(function(){ var TstLink = document.url.split('?')[0].split('#')[0]; $("body a").each( function(){ if($(this).attr("href") == TstLink) $(this).addclass("left_menu_selected"); }); }); </script>