if str contains jquery

JavaScript
if (str.indexOf("Yes") >= 0)
  
  //case insensitive version
  if (str.toLowerCase().indexOf("yes") >= 0)
Source

Also in JavaScript: