如何jQuery完成每个 [英] How to Jquery each complete
本文介绍了如何jQuery完成每个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我没有在$ .each()中完成.这是怎么做的?请帮助我
I did not do the complete in $.each(). how this is done ? Please help me
$("element").each(function (i, v) {
//No problem
}, function () {
//How to complete finished ??
// alert(each finish);
})
推荐答案
要在each
循环结束后执行代码:
To execute code after the each
loop is over :
var count = $("element").length;
$("element").each(function (i) {
// loop
if (i+1 === count) {
// this will be executed at the end of the loop
}
});
这篇关于如何jQuery完成每个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文