javascript - jQueryUI on("menuselect") not firing every time -


creating menu jqueryui, noticed if select menuitem, fires appropriate event properly. however, if select menuitem right away (without clicking on outside menu first), not fire menuselect event , treats a tag regular link (this pattern repeats: 1 okay, 1 ignored, 1 okay, 1 ignored, etc...)

here jsfiddle demonstrates issue: http://jsfiddle.net/j9eyv/4/

(1) broken: click option, click one.

(2) works: click option, click outside menu, click option.

the code modeled after jqueryui demo here: http://api.jqueryui.com/menu/#event-select

am missing something?

edit:

if call $(selector).menu("focus") or, indeed, $(selector).menu("idontunderstand"), event callback, 'fixes' issue. doesn't sound right.

i'm not sure "menuselect" you're using works fine if this:

 $("#menu").menu();   $("#menu a").click(function() {      alert($(this).attr("href"));      return false;  }); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -