jQuery doesn't work after content is loaded via AJAX

后端 未结 9 1076
野的像风
野的像风 2020-11-22 15:21

On this page I have a jQuery popup window and thumbnail resizable images. If I mouse over on the thumbnails, the images are resizing perfectly. Also, when I click on the big

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 16:08

    I'm late to the party but I would combine two of the answers. What worked for my specific needs was to incorporate the ajaxstop within the complete

    complete: function () {
         $( document ).ajaxStop(function() {
             //now that all have been added to the dom, you can put in some code for your needs.
             console.log($(".subareafilterActive").get().length)
    
         })
    }
    

提交回复
热议问题