Enabled search, added lodash and other minor improvements

This commit is contained in:
Deon George
2013-05-08 19:42:55 +10:00
parent e3c93e1d38
commit 42059cb0e5
8 changed files with 108 additions and 56 deletions

View File

@@ -7,3 +7,7 @@
padding-top: 56px;
}
}
.pull-right > .dropdown-menu {
right: auto;
}

View File

@@ -0,0 +1,25 @@
$(document).ready(function() {
var backToTop = $('<a>', { id: 'back-to-top', href: '#top' });
var icon = $('<i>', { class: 'icon-chevron-up' });
backToTop.appendTo ('body');
icon.appendTo (backToTop);
backToTop.hide();
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
backToTop.fadeIn ();
} else {
backToTop.fadeOut ();
}
});
backToTop.click (function (e) {
e.preventDefault ();
$('body, html').animate({
scrollTop: 0
}, 600);
});
});

View File

@@ -1,37 +0,0 @@
$(function () {
Application.init ();
});
var Application = function () {
return { init: init };
function init () {
enableBackToTop ();
}
function enableBackToTop () {
var backToTop = $('<a>', { id: 'back-to-top', href: '#top' });
var icon = $('<i>', { class: 'icon-chevron-up' });
backToTop.appendTo ('body');
icon.appendTo (backToTop);
backToTop.hide();
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
backToTop.fadeIn ();
} else {
backToTop.fadeOut ();
}
});
backToTop.click (function (e) {
e.preventDefault ();
$('body, html').animate({
scrollTop: 0
}, 600);
});
}
}();