javascript - jQuery only ignoring a click trigger during a trigger chain. -


i have following code:

$( "#check-button" ).on( "click", function() {     $("#button_cart").click();     $('.checkout-button').click(); }); 

i have jquery click event. want , on clicking check-button, first line inside function updating cart ( reloads page) , second line inside function checkout button, takes me next(checkout) page.

but here first event firing. because page reloaded on "button-cart" clicking? how solve it?

that's correct. second click working in kind of limbo between click , load , wont see it.

the solution "handle" reload event, put between "" because event can't handled ( far know) can make hacks.

first, why reloading page? adding new content?

in case call click in content added load handler $(document).ready();


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -