开发者

quick jquery each loop question

I开发者_运维知识库f i write

$('.myclass').each(function () {});

and there are no elements of myclass on a particular page, will it create problems?

Thanks.


no you will be fine, it will basically do nothing. If jQuery finds no elements named ".myclass" it just continues on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜