Sha256: 55fa1026ae2f5c60d5ae64775bc363875a47d4abb4d1f96be023f8f9b4541a8a

Contents?: true

Size: 336 Bytes

Versions: 6

Compression:

Stored size: 336 Bytes

Contents

GitDocs.search = {
  highlight : function(query) {
    $('.results dl dd').each(function(idx, el) {
      var result = $(el).text().replace(query, "<strong>" + query + "</strong>");
      $(el).html(result);
    });
  }
};

$(document).ready(function() {
  var query = $('.results').data("query");
  GitDocs.search.highlight(query);
});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gitdocs-0.4.7 lib/gitdocs/public/js/search.js
gitdocs-0.4.6 lib/gitdocs/public/js/search.js
gitdocs-0.4.5 lib/gitdocs/public/js/search.js
gitdocs-0.4.3 lib/gitdocs/public/js/search.js
gitdocs-0.4.2 lib/gitdocs/public/js/search.js
gitdocs-0.4.1 lib/gitdocs/public/js/search.js