Note that there are some explanatory texts on larger screens.

plurals
  1. POUsers Input to Filter Table Rows
    primarykey
    data
    text
    <p>What do I need to do so when I start typing in the filer and the rows will filter correctly?data contains in database is 'europe'and'Europe',if i type'e' it showing only 'europe' but i want to display both data,how to do that ...</p> <p><strong>Filter Code</strong></p> <pre><code>$(document).ready(function() { $("#content").keyup(function(){ //hide all the rows $("#fbody").find("tr").hide(); //split the current value of searchInput var data = this.value.split(" "); //create a jquery object of the rows var jo = $("#fbody").find("tr"); //Recusively filter the jquery object to get results. $.each(data, function(i, v){ jo = jo.filter("*:contains('"+v+"')"); }); //show the rows that match. jo.show(); //Removes the placeholder text }).focus(function(){ this.value=""; $(this).css({"color":"black"}); $(this).unbind('focus'); }).css({"color":"#C0C0C0"}); }); </code></pre> <p>HTML</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;div&gt; &lt;form name="welcomeDiv1" id="welcomeDiv1"&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="text" class="textbox_supplier" name="content" id="content" &gt; &lt;/td&gt; &lt;td&gt; &lt;input type="text" class="textbox_supplier2" name="content2" id="content2" &gt;&lt;/td&gt; &lt;td&gt; &lt;input type="submit" class="textbox_supplier7" value="+" name="submit" class="comment_button"/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/form&gt; &lt;/div&gt; &lt;table id="anyid" class="sortable" &gt; &lt;thead&gt; &lt;tr&gt; &lt;th data-sort="int" style="width:163px" &gt;Supplier ID &lt;/th&gt; &lt;th style="width:327px" &gt;supplier Name &lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody id="fbody"&gt; &lt;tr&gt; &lt;td width="144px" class="edit_td"&gt; &lt;input type="text" style="width:127px;margin:1px 0 0" class="editbox" id="supplierid_input" /&gt; &lt;/td&gt; &lt;td width="310px" class="edit_td"&gt; &lt;input type="text" style="width:172px;margin:1px 0 0" class="editbox" id="suppliername_input"/&gt; &lt;/td&gt; &lt;td width="52px"&gt;&lt;div class="delete" id="id"&gt;x&lt;/div&gt;&lt;/td&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload