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

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -