javascript - jQuery on click run functions inside twice -


is possible run functions twice on click function?

example:

$('a').click(function(){     function1();     function2(); }); 

this should run function1(); function2(); , again function1(); function2();

try bind events twice , if want run function more twice preferred way looping.

function twice(){     function1();     function2(); }  $('a').click(twice).click(twice); 

demo


Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -