Skip to content

A simple jQuery plugin for filtering through elements that match a specified search parameter.

Notifications You must be signed in to change notification settings

mattgoucher/jQuery-Simple-Search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jQuery Simple Search

A simple jQuery plugin for filtering through elements that match a specified search parameter.

Configuration

Markup

    <input type="text" id="search-input">

    <ul id="awesome-list">
      <li class="item" data-search="pie pumpkin">Pumpkin Pie</li>
      <li class="item" data-search="pie cherry">Cherry Pie</li>
      <li class="item" data-search="cake cheese">Cheese Cake</li>
      <li class="item" data-search="donut maple">Maple Donut</li>
      [...]
    </ul>

Javascript

  $(function(){

    $('#search-input').search({
      list:          $('#awesome-list'), // All of the items you wish to be searched
      disableSubmit: true                // Disable default action (submit) of parent form
    });

  });

About

A simple jQuery plugin for filtering through elements that match a specified search parameter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published