if string contains jquery code example
Example 1: if string javascript
if (typeof myVar === 'string') { /* code */ };
Example 2: if str contains jquery
if (str.indexOf("Yes") >= 0)
//case insensitive version
if (str.toLowerCase().indexOf("yes") >= 0)
Example 3: javascript string contains
var string = "foo",
substring = "oo";
console.log(string.includes(substring));
Example 4: jquery contains text
$( "div:contains( 'hello' )" )