title: Live jQuery search issue - display issue
body: <p>I have List and Grid views and a input box, where you can search for the li elements. The search works fine on both views. However, If you search on one view and then switch to another, it is changes the width of the li element and displays incorrectly. </p>
  
  <p>HTML: Input and count display</p>
  
  <pre><code>   &lt;div class="input-group pull-left seach_holder"&gt;
    &lt;form id="live-search" action="" class="styled live-search" method="post"&gt;
      &lt;input style="width:200px;" id="filter_vacs" type="text" class="search-bar form-control" placeholder="search"&gt;
      &lt;span class="vac_count_2" id="filter-count"&gt;&lt;/span&gt;
      &lt;div class="input-group-btn"&gt;
      &lt;/div&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS: Live Search </p>
  
  <pre><code>$(document).ready(function(){
      $("#filter_vacs").keyup(function(){
  
          // Retrieve the input field text and reset the count to zero
          var filter = $(this).val(), count = 0;
  
          // Loop through the comment list
          $(".parent_vac li").each(function(){
  
              // If the list item does not contain the text phrase fade it out
              if ($(this).text().search(new RegExp(filter, "i")) &lt; 0) {
                  $(this).fadeOut(1000);
  
              // Show the list item if the phrase matches and increase the count by 1
              } else {
                  $(this).show();
                  count++;
              }
          });
  
          // Update the count
          var numberItems = count;
          $("#filter-count").text(""+count);
  
  
      });
  });
  </code></pre>
  
  <p>Thank for any help!</p>