jquery - li click event not working -
hi creating search box using li , input text.
i want load page based on selected results of search box, whenever search result clicked.
search result in form of li on binding below click event.
somehow following click event not firing
$("li").click(function(){ alert("hi"); alert($(this).text()); return false; });
see js fiddle more details:
just listen mousedown
instead of click
. happens because click waits mouseup
event, never triggered because blur
comes first, hiding panel.
$("li").mousedown(function(){ ...
working fiddle: http://jsfiddle.net/3umj3fup/
Comments
Post a Comment