diff options
Diffstat (limited to 'assets')
-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 }) |