jquery calling a function with a variable -


i'd store functions in variables, so:

var x = function() {     //do here } 

how call function in onclick example?

try this

$('#element').on('click',function(){     x();  }); 

or

$('#element').on('click',x); 

demo


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

image - ClassNotFoundException when add a prebuilt apk into system.img in android -