title: How to see if string contains substring when both string and substring are loaded dynamically on page
body: <p>I have found many help for 'string contain specific substring' when substring is known so we can specify like -     "Number".in(Str)) OR Str.indexOf("Number")</p>
  
  <p>But in my case both String and sub string loaded at run time so i tried like -</p>
  
  <pre><code>function compareTables1(row,kk) {
  
   $('#table2 tr').each(function(p) {
       if (!this.rowIndex) return; // skip first row
  
      var customer = $(this).find("td").eq(0).html();
      if (customer.trim() == row.trim()) {
        checkme(this, kk);
      }       
       else
       {
           if (row.in(customer)) {  //why this does not work????
           alert("success sub str check");
  
       }}});   
    }
  </code></pre>
  
  <p>link to entire code is -
   <a href="http://jsfiddle.net/w7akB/55/" rel="nofollow">http://jsfiddle.net/w7akB/55/</a></p>
  
  <p>I am learning Jquery &amp;  sure missing something small here.
  thanks for help in advance.</p>