packages/ssoinabox-webui/root/usr/local/share/ssoinabox/htdocs/res/grep.js
author Dan Fuhry <dan@enanocms.org>
Sat, 23 Feb 2013 14:26:38 -0500
changeset 9 f4bf6556fb9f
parent 0 3906ca745819
permissions -rw-r--r--
Merged

$(function()
	{
		$('.grep-filter').bind('keyup', function()
			{
				var searchkey = $(this).val();
				
				if ( $(this).val() == '' )
				{
					$('.grep-me tr').show();
					return;
				}
				
				$('.grep-me tr').each(function(i, e)
					{
						if ( $('.grep-col', e).text().toLowerCase().indexOf(searchkey.toLowerCase()) > -1 )
							$(e).show();
						else
							$(e).hide();
					});
			});
	});