Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- var search_box;
- search_box = $('#search');
- return search_box.bind('keyup', function() {
- var items;
- items = $('.item_link');
- return items.each(function() {
- var item, query;
- query = $('#search').val();
- item = $(this);
- if (query.length === 0) {
- return item.show();
- } else if (item.text().indexOf(query) === -1) {
- return item.hide();
- }
- });
- });
- });
Add Comment
Please, Sign In to add comment