Created
August 3, 2015 20:41
-
-
Save cameronscott137/6704d2b1268b443654a7 to your computer and use it in GitHub Desktop.
Hides popovers when tooltip is active
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map.init = function() { | |
jQuery.get('resources.json', function(resources) { | |
Map.resources = resources; | |
$('#map').load('map.svg', function() { | |
$('svg').svg(); | |
var svg = $('svg').svg('get'); | |
if (!$('rect').hasClass("selected")) { | |
$(this).hover(Map.tooltip); | |
} | |
$('svg').mouseout(Map.tooltipHide); | |
$('#map').click(Map.tooltipHide); | |
$('rect').click(Map.popup); | |
$('body').click(Map.popdown); | |
}); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment