I have the following JavaScript file:
/*global $ */
function foo() {
'use strict';
var $tr = $('table tr'),
$td = $tr.children('td');
$td.html('Hello World');
}
In PHPStorm, children gets underlined with a weak warning. Mousing over it reveals this message:
Method expression is not of Function type
This file is in the same directory as jquery.min.js (v. 1.11.0, if that matters).
How can I fix this?
Note that the above example is a minimalist example sufficient to reproduce the problem; it's not my actual code, but it will product the same result.
$is referring to jQuery? can you tryvar $tr = jQuery('table tr')$tojQuery. Thanks.