[jQuery] Add class selected to a hyperlink in navibar! Help me.
I have default.aspx page include some usercontrols menu.ascx
and in default page i using jquery to add selected class to a link
clicked
function pageLoad() {
$('#menu a').click(function() {
$('#menu a').removeClass('selected');
$(this).addClass('selected');
});
}
And a problem is: can't add class 'selected' to a link clicked ( a
link is : <a href="localhost:2572/contact/">contact</a>
but when link is <a href=#>test</a> then is added 'selected' class in
css.
Pls, help me solve problem.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home