I am trying to achieve in JQuery that once a user click on a link, such as Feedback.aspx the select attribute from Default.aspx li will be removed and will be added to Feedback.aspx li
<ul id="main_menu" class="main_menu ui-sortable">
<li class="limenu select"><a href="Default.aspx"><span class="ico gray shadow home"></span><b style="">Home</b></a></li>
<li class="limenu"><a href="OnlineUsers.aspx"><span class="ico gray shadow messenger"></span><b style="">Who is online?</b></a></li>
<li class="limenu"><a href="Feedback.aspx"><span class="ico gray shadow hand_thumbsup"></span><b style="">Feedback</b></a></li>
<li class="limenu"><a href="About.aspx"><span class="ico gray shadow info"></span><b style="">About</b> </a></li>
<li class="limenu"><a href="UserDetails.aspx"><span class="ico gray shadow user"></span><b style="">User Details</b> </a></li>
<li class="limenu"><a href="ChangePassword.aspx"><span class="ico gray shadow password"></span><b style="">Change Password</b></a></li>
<li class="limenu"><a href="Login.aspx"><span class="ico gray shadow power"></span><b style="">Logout</b> </a></li>
</ul>
EDIT: My new url is being opened so i need to find Feedback.aspx in the new page add select to it
This should do :
Demonstration
I added
e.preventDefaultin this example to not follow the link, I suppose your example uses a default target to a similar effect.If you’re changing page, the simplest solution is to check at opening what’s the page :