1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-22 09:56:51 +01:00

I love when people just change their function names, fix search

This commit is contained in:
Matthias Kretschmann 2014-04-12 17:22:02 +02:00
parent 3ed018d959
commit 4b53e1d60b
2 changed files with 8 additions and 7 deletions

View File

@ -17,20 +17,21 @@ var siteNavigation = {
siteSearch: function() { siteSearch: function() {
var $searchlink = $('.search-btn'), var $searchlink = $('.search-btn'),
$searcharea = $('.topbar .search-area'), $searcharea = $('.topbar .search-area'),
$searchfield = $('.search-field'), $searchfield = $('.search-field'),
$searchresults = $('.search-results'), $searchresults = $('.search-results'),
$searchpop = $('.popover'); $searchpop = $('.popover');
$searchlink.click(function(e){ $searchlink.click(function(e){
e.preventDefault(); e.preventDefault();
// init jekyll search // init jekyll search
$searchfield.simpleJekyllSearch({ $searchfield.jekyllSearch({
searchResults : '.search-results', searchResults : $searchresults,
searchResultsTitle : '', searchResultsTitle : '',
template : '<a class="nav-link" href="{url}" title="{title}">{title}</a>', template : '<a class="nav-link" href="{url}" title="{title}">{title}</a>',
fuzzy : true
}); });
// show search // show search

View File

@ -14,7 +14,7 @@
"masonry": "http://masonry.desandro.com/masonry.pkgd.min.js", "masonry": "http://masonry.desandro.com/masonry.pkgd.min.js",
"imagesloaded": ">=3.1.0", "imagesloaded": ">=3.1.0",
"infinitescroll": "https://raw.github.com/paulirish/infinite-scroll/master/jquery.infinitescroll.js", "infinitescroll": "https://raw.github.com/paulirish/infinite-scroll/master/jquery.infinitescroll.js",
"simpleJekyllSearch": "https://raw.github.com/christian-fei/Simple-Jekyll-Search/master/jekyll-search.js", "simpleJekyllSearch": "https://raw.github.com/christian-fei/Simple-Jekyll-Search/master/jekyll-search.jquery.js",
"socialite": "https://raw.github.com/tmort/Socialite/master/socialite.js", "socialite": "https://raw.github.com/tmort/Socialite/master/socialite.js",
"jquery.adaptive-background": "https://raw.github.com/briangonzalez/jquery.adaptive-backgrounds.js/master/src/jquery.adaptive-backgrounds.js" "jquery.adaptive-background": "https://raw.github.com/briangonzalez/jquery.adaptive-backgrounds.js/master/src/jquery.adaptive-backgrounds.js"
}, },