javascript - How make a change focus menu in css/html/jquery -


my problem simple: want make menu http://edition.cnn.com/

when click in 1 of buttons in menu, want focus , rest of them lose it. problem seems easy, tried different ways , none of them work. can me? how can make this?

the other ways: putting focus in html.actionlink menu

i want when click in button, when page refresh focus , others keep normal or, if button selected, turn normal.

thanks sugestions.

fiddle demo

hope helps you!!!

$(function(){     var jqmenu = $("#barre_menu").menu();      $("#focus1").click(function(){         try{             jqmenu.menu( "focus", null, jqmenu.find("#azer"));         }         catch(exc){             alert("exception caught : "+exc);         }     });     $("#focus2").click(function(){         try{             jqmenu.menu( "focus", null, jqmenu.find("#qsdf"));         }         catch(exc){             alert("exception caught : "+exc);         }     });     $("#focus2").click(function(){         try{             jqmenu.menu( "focus", null, jqmenu.find("#wxcv"));         }         catch(exc){             alert("exception caught : "+exc);         }     }); }); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -