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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -