routes filter js

This commit is contained in:
Sanj 2012-02-16 03:30:21 +05:30
parent 89b8c8b3dc
commit 3a7813b785

View File

@ -8,13 +8,13 @@
<script type="text/javascript">
$(function() {
$('#searchRoutes').change(function() {
var val = $(this).val();
var val = $(this).val().toLowerCase();
$('.route').each(function() {
var txt = $(this).text();
var txt = $(this).text().toLowerCase();
if (txt.indexOf(val) != -1) {
$('.route').show();
$(this).show();
} else {
$('.route').hide();
$(this).hide();
}
});
});