diff options
Diffstat (limited to 'assets/mapper.js')
-rw-r--r-- | assets/mapper.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/assets/mapper.js b/assets/mapper.js index df3c8fe..46b203d 100644 --- a/assets/mapper.js +++ b/assets/mapper.js @@ -205,13 +205,15 @@ function listSections(sections) { var li = $('<li>') li.attr('id', 's-' + s.id) li.html(s.name) - li.mouseover(function(e) { -// console.log('mouseover: fetching markers') - var sec_id = $(this).attr('id').substr(2) - fetchMarkers(sec_id) - }).click(function(e) { + li.click(function(e) { + if ($.isEmptyObject(Markers[sec_id])) { + $(this).addClass('pending') + return false + } + $(this) + .removeClass('pending') + .toggleClass('active') var sec_id = $(this).attr('id').substr(2) - $(this).toggleClass('active') toggleMarkers(sec_id) return false }) |