--- title: Search | Compass Documentation crumb: Search body_id: search --- - content_for(:javascripts) do %script(type="text/javascript" src="/docs/javascripts/search-data.js") %script(type="text/javascript" src="/docs/javascripts/jquery.url.packed.js") :javascript $(function(){ if ($.url.param("q")) { var query = $.url.param("q").replace("+"," "); $('input#q').attr('value', query); search(query, displayResults); } $('input#q').keyup(function(){ search(this.value, displayResults); }); }) function displayResults(items) { if (items.length > 0) { var html = "" for (var i = 0; i < items.length; i++) { html += '