findWithAssert (selector) Object
public
Like find
, but throws an error if the element selector returns no results.
Example:
var $el = findWithAssert('.doesnt-exist'); // throws error
Parameters:
-
selector
String
- jQuery selector string for finding an element within the DOM
Returns:
-
Object
- jQuery object representing the results of the query
Please login to continue.