更新时间:2022-10-23 10:51:07
$(文件).ajaxComplete(函数(){
//火灾时,任何Ajax请求完成
})
I am using .load() to pull static HTML files onto my main HTML page. The scripts and selectors that I have written exist within:
$(document).ready(function(){});
But they don't work on the AJAX loaded content. I have read that this is because the selectors that I am using are not available.
Is there a better way to do this? Adding the script to the window.load function doesn't work either:
$(window).load(function() {});
$(document).ajaxComplete(function(){
// fire when any Ajax requests complete
})