Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
好的,我有一些代码
$.get('results1.html', function(data) { $('#search-results').html(data); }).complete(function() { BlockStuffNow(); });
BlockStuffNow(); 是一个对已加载到#search-results 中的图像进行操作的函数,但它只能在它们全部加载后才能对它们进行操作,我如何检查它们是否已加载?
您可以使用简单的加载,然后运行回调函数...
$("#search-results").load("results1.html",function(){ $('img').load(function(){ BlockStuffNow(); }) });