我最近升级了PHPStorm IDE的版本,现在它警告我jQuery使用效率低下.
例如:
var property_single_location = $("#property [data-role='content'] .container");
Prompts this warning:
判断jQuery Select 器是否以有效的方式使用.它表明
所以我的问题是:
为什么这样做效率很低?执行上述 Select 的有效方法是什么?
I'd guess at:
var property_single_location = $("#property").find("[data-role='content']").find(".container");
Is this the right way?