Basically I want a click on one <A> to trigger a click event on the other <A> to show the dropdown menu. Here is the code: the fiddle here
//not working
$('#foo').click(function(){$('#bar').click();});
//but this works
//$('#foo').click(function(){$('#bar').click();alert();});
Could someone please tell me what’s going on? Thanks!
Add
return false, it should workDemo: http://jsfiddle.net/mfUxU/2/