Use on click do not work after ajax call

Use jQuery.on():

$( document ).on( 'click', '', function () {
    // Do click stuff here
} );
You need to bind on to an element that will always be present. (document or some main wrapper div). Using on with the dynamic element will not work.

0 Bình luận

Trở về
  • HTML5 Canvas
  • HTML5 Canvas

     The <canvas> element is used to draw graphics, on the fly, on a web page. Draw a red rectangle, a gradient rectangle,...