javascript - Active Accordeon Menu don't work with sublinks with query strings -
@ejay me set "opened" main link if click iin sublinks of this...
here: set "active" accordion menu after click
i make modifications like:
<script type="text/javascript"> $(document).ready(function(){ var spath = window.location.pathname; var spage = spath.substring(spath.lastindexof('/') + 1); var url = spage.split('?')[0]; $('dd').filter(function () { return $('a[href="' + url + '"]', $(this)).length == 0 }).hide(); $('dt a.submenu').click(function () { $("dd:visible").slideup("slow"); $(this).parent().next('dd').slidedown("slow"); return false; }); }); </script>
this script works if link
<a href="test.asp">teste</a>
if link way: <a href="test.asp?category=blablabla">blablabla</a>
don't work..
what wrong
can see menu working partly here: http://alsite.com.br/saks_div/
if
var spath = window.location.pathname;
works url's abc.asp
following should work url's having query string, e.g., produtos_categoria.asp?categoria=something
var spath = window.location.pathname+window.location.search;
Comments
Post a Comment