i'm using live search modified run after pressing enter(i have large table , causes text entry lag if done on keyup) , i'm trying find out way make exact search instead of similar. reason being have column store numbers starting 1 on 7000, if type in '1' whole slew of results. i'm new jquery , i've tried play around feel i'm getting no where. , appreciated.
here code:
$('#search').keyup(function(e) { if (e.keycode == 13) { $(this).trigger("enterkey"); } }); $("#search").bind("enterkey", function() { var value = $(this).val(); $("table tr").each(function(index) { if (index !== 0) { $row = $(this); var id = $row.find("td:first").text(); if (id.indexof(value) !== 0) { $row.hide(); } else { $row.show(); } } }); });
Comments
Post a Comment