diff options
author | hellekin <hellekin@cepheide.org> | 2018-04-04 13:44:48 +0200 |
---|---|---|
committer | hellekin <hellekin@cepheide.org> | 2018-04-04 13:44:48 +0200 |
commit | 23124d766c877a1510a4ec4ed0aa3f9ba992f616 (patch) | |
tree | 29bce8cf2e139e04d7cfee208fd27a7c8e9b3cfc | |
parent | 0bd30846c2138cde2559f04afc8d869b2adcf99b (diff) | |
download | wallonie-demain-proto-23124d766c877a1510a4ec4ed0aa3f9ba992f616.tar.gz |
Fix overlooked variable
-rw-r--r-- | assets/mapper.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/mapper.js b/assets/mapper.js index 46b203d..2fc373d 100644 --- a/assets/mapper.js +++ b/assets/mapper.js @@ -201,11 +201,12 @@ function listSections(sections) { var ul = $('<ul>') sections.forEach(function(s, i) { // Preload data - fetchMarkers(sec_id) + fetchMarkers(s.id) var li = $('<li>') li.attr('id', 's-' + s.id) li.html(s.name) li.click(function(e) { + var sec_id = $(this).attr('id').substr(2) if ($.isEmptyObject(Markers[sec_id])) { $(this).addClass('pending') return false @@ -213,7 +214,6 @@ function listSections(sections) { $(this) .removeClass('pending') .toggleClass('active') - var sec_id = $(this).attr('id').substr(2) toggleMarkers(sec_id) return false }) |