From 091baa951effaae1c2cc4ff49727e393da8fd053 Mon Sep 17 00:00:00 2001 From: xjackk Date: Wed, 17 Jul 2019 00:25:59 -0400 Subject: [PATCH] fixing map search again --- _includes/colleges/sectiontwo.html | 2 +- assets/js/colleges-and-universities/institutions.js | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/_includes/colleges/sectiontwo.html b/_includes/colleges/sectiontwo.html index 4cf74c88..aae533ad 100644 --- a/_includes/colleges/sectiontwo.html +++ b/_includes/colleges/sectiontwo.html @@ -56,7 +56,7 @@

Instructions

diff --git a/assets/js/colleges-and-universities/institutions.js b/assets/js/colleges-and-universities/institutions.js index 6a9368b1..2ebee4b3 100644 --- a/assets/js/colleges-and-universities/institutions.js +++ b/assets/js/colleges-and-universities/institutions.js @@ -346,12 +346,10 @@ function createInstTable() { }); }; -function filterSearch() { - // handle input filter.. - $('.map-search__input').keyup(function() { - +function filterMapSearch() { + $('#map-search__input').keyup(function() { var input, filter, ul, li, i, txtValue; - input = document.getElementById('map-keydown'); + input = document.getElementById('map-search__input'); filter = input.value.toUpperCase(); ul = document.getElementById("map-search-ul"); li = ul.getElementsByTagName('li'); @@ -371,6 +369,7 @@ function filterSearch() { function filterSearchMobile() { // handle input filter.. $('#mobile-keydown').keyup(function() { + console.log('mobile keydown pressed'); const filter = document.getElementById('mobile-keydown').value.toUpperCase(); const li = document.getElementById("map-search-ul--mobile").getElementsByTagName('li'); @@ -420,10 +419,10 @@ function searchMobileToggle() { $(document).ready(function(){ createMapbox(); + filterMapSearch(); searchToggle(); searchMobileToggle(); filterSearchMobile(); - filterSearch(); createInstTable(); });