我有几个用 Ajax 调用更新的 div(它是 MVC,但完成后的 HTML 看起来像这样):
<div class="progresswrapper running" id = "ProgressWrapper1"></div>
<div class="progresswrapper running" id = "ProgressWrapper2"></div>
然后是javascript:
<script type="text/javascript">
$(function () {
var timerid = window.setInterval(function () {
$('.progresswrapper.running').each(function () {
UpdateDivWithDataFromServer();
if(I'm done with this div) {
$(this).removeClass("running");
}
});
}, 500);
有可能以某种方式做到这一点吗?