Skip to content

Instantly share code, notes, and snippets.

@cameronscott137
Created August 3, 2015 20:41
Show Gist options
  • Save cameronscott137/6704d2b1268b443654a7 to your computer and use it in GitHub Desktop.
Save cameronscott137/6704d2b1268b443654a7 to your computer and use it in GitHub Desktop.
Hides popovers when tooltip is active
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