diff --git a/_layouts/page.html b/_layouts/page.html
index 2066540..d08ad17 100644
--- a/_layouts/page.html
+++ b/_layouts/page.html
@@ -96,18 +96,16 @@
Trump Tracker
+
-
@@ -166,6 +164,7 @@
$("#search-field").keyup(function () {
$("#search-results").html("");
if($("#search-field").val()!="") {
+ var search = $("#search-field").val().toLowerCase();
//show the results div
$("div.row.search-results").show();
//loop through each tab panel (easier to grab heading info)
@@ -174,7 +173,7 @@
var display_section = true;
var display_heading = true
$(this).find("tbody td").each(function () {
- if ($(this).text().toLowerCase().indexOf($("#search-field").val()) != -1) {
+ if ($(this).text().toLowerCase().indexOf(search) != -1) {
if(display_section) {
//appends section to search results
$("#search-results").append('
' +
@@ -191,13 +190,16 @@
}
$("#search-results").append('' + $(this).text() + '')
}
- }, display_section, display_heading, panel_id);
+ });
});
} else {
//fixes spacing caused by empty elements
$("div.row.search-results").hide();
}
});
+ $("form.search").submit(function(e){
+ e.preventDefault();
+ });
var oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds
var todayDate = Date.now();
diff --git a/css/styles.sass b/css/styles.sass
index a845151..fdeca9c 100644
--- a/css/styles.sass
+++ b/css/styles.sass
@@ -1,2 +1,16 @@
---
---
+
+// begin
+.navbar-form
+ border: none
+
+.navbar-header .search
+ width: 250px
+ margin-top: 8px
+
+@media screen and (max-width: 500px)
+ .navbar-header .search
+ margin-top: 8px
+ width: 100%
+ padding: 1em
\ No newline at end of file