Skip to content
Permalink
Browse files

Moved search code into the template. No need for a separate file there.

  • Loading branch information...
stevestreza committed Aug 7, 2013
1 parent f1361d2 commit a64820a64da8164696ed5d3dca5a47f5a8da5ab0
Showing with 11 additions and 10 deletions.
  1. +0 −9 public/javascripts/search.js
  2. +0 −1 views/index.hbs
  3. +11 −0 views/layout.hbs

This file was deleted.

@@ -57,4 +57,3 @@
</div>
</div>
</div>
<script src="javascripts/search.js"></script>
@@ -67,6 +67,17 @@
$(document).keyup(function(e){
$(document.body).removeClass("show-shortcuts");
});
var $rows = $("#services").children("div");
$('#search').keyup(function() {
var val = $.trim($(this).val()).replace(/ +/g, ' ').toLowerCase();
$rows.show().filter(function() {
var $this = $(this);
var text = $this.text().replace(/\s+/g, ' ').toLowerCase();
return !~text.indexOf(val);
}).hide();
});
});
</script>

0 comments on commit a64820a

Please sign in to comment.
You can’t perform that action at this time.