Find a string contains a particular string in JQuery

  1. var myVar="sibeesh passion");  
  2.  if (myVar.toString().indexOf('passion') > 0) {  
  3.   
  4.  }  
  5.  else {  
  6.  } 
The above code helps you to find whether a string contains a particular string or not in JQuery.
 
Kindest Regards
Sibeesh
http://sibeeshpassion.com/