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
Post a Comment