I wrote the code shown below to call lightbox show and callback some function, for example function_a, but it will fire 16 times.
How can I make it fire only once?
$("#open").click(function(){ $('.a, .b, .c, .d').fadeOut(600,function(){ $('.e, .f, .g, .h').fadeIn(400,function(){ function_a(); }); }); }); function_a(){ console.log('fire') };