javascript - Single click on dynamically added element -
most people know how bind "click' event dynamically added element with
$('#main').on('click','.link',function(){ //some code here }); where .link dynamically added element. how code above should when want fire function on first click? yes, know .one(), question merge .one() .on().
jquery docs show .one() , .on() same of 1.7:
.one( events [, selector ] [, data ], handler ) .on( events [, selector ] [, data ], handler )
Comments
Post a Comment