Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
快速jquery每个循环问题_Jquery - Fatal编程技术网

快速jquery每个循环问题

快速jquery每个循环问题,jquery,Jquery,如果我写 $('.myclass').each(function () {}); 而且在特定页面上没有myclass的元素,它会产生问题吗 谢谢。不,你会没事的,它基本上什么都不会做。如果jQuery没有找到名为“.myclass”的元素,它将继续运行。不,您会没事的,它基本上不会做任何事情。如果jQuery没有找到名为“.myclass”的元素,它将继续

如果我写

$('.myclass').each(function () {});
而且在特定页面上没有myclass的元素,它会产生问题吗


谢谢。

不,你会没事的,它基本上什么都不会做。如果jQuery没有找到名为“.myclass”的元素,它将继续运行。

不,您会没事的,它基本上不会做任何事情。如果jQuery没有找到名为“.myclass”的元素,它将继续