Click here to Skip to main content
15,887,485 members

Comments by Member 10193753 (Top 2 by date)

Member 10193753 8-Oct-15 10:47am View    
Sorry...I forgot to reply you....and to thank you!
I basically solved in this way:
$("#sideBarMenu li a[href='<%= Path.GetFileName(Request.Url.AbsolutePath) %>']").parent("li").addClass("active");
and not...I'm not using CMS :)

Anyway...I solved it! thanks for the idea!!!
Member 10193753 29-Jun-15 9:23am View    
Hi! I've more or less the same request, but...I have "pages"...
so, my <li>st is like this:
<ul>
<li>Products</li>
<li>Product 1</li>
<li>Product 2</li>
<li>Product 3</li>
<li>Product 4</li>
</ul>

my function could be...? (I don't need query string... I think...)

$(function () {

// Highlight current menu item.
var currentPage= '<%= Request.??["PAGENAME?"] %>';
$("li" + currentPage??).addClass("current");

});
Have you some tricks for a serverside solution?