Delagate in jquery is not working as expected

dingbat

New Member
i have used two div and defined click event for their inner elementusing delegate in jquery 1.7.2. first click event is working fine as expected and second is not working. \[code\] $("#first").delegate(".ask div:first","click",function(e){ alert("hi"); }); $("#second").delegate(".ask div:first","click",function(e){ alert("hello"); });?\[/code\]Html markup:\[code\]<div id="first" ><div class="ask"> <div> hi </div> <div> disabled </div></div></div><div id="second" > <div class="ask"> <div> hello </div> <div> disabled </div></div>\[/code\]http://jsfiddle.net/YjK3N/3/?But in jquery lower version the above code is working fine as expected.
 
Back
Top