#1H4ckF4ctorVie Mayo 16, 2014 5:35 pm
H4ckF4ctor
Admin
$(document).ready(function(){
// set the wrapper width and height to match the img size
$('#wrapper').css({'width':$('#wrapper img').width(),
'height':$('#wrapper img').height()
})
//tooltip direction
var tooltipDirection;
for (i=0; i<$(".pin").length; i++)
{
// set tooltip direction type - up or down
if ($(".pin").eq(i).hasClass('pin-down')) {
tooltipDirection = 'tooltip-down';
} else {
tooltipDirection = 'tooltip-up';
}
// append the tooltip
$("#wrapper").append("
\
");" + $(".pin").eq(i).html() + "
\}
// show/hide the tooltip
$('.tooltip-up, .tooltip-down').mouseenter(function(){
$(this).children('.tooltip').fadeIn(100);
}).mouseleave(function(){
$(this).children('.tooltip').fadeOut(100);
})
});
North America
- Area (km�): 24,490,000
- Population: 528,720,588
South America
- Area (km�): 17,840,000
- Population: 382,000,000
Europe
- Area (km�): 10,180,000
- Population: 731,000,000
Africa
- Area (km�): 30,370,000
- Population: 1,022,011,000
Asia
- Area (km�): 43,820,000
- Population: 3,879,000,000
Australia
- Area (km�): 9,008,500
- Population: 31,260,000
Back to article / Drop me a message on Twitter!
(function(){
var bsa = document.createElement('script');
bsa.async = true;
bsa.src = 'http://www.red-team-design.com/js/adpacks-demo.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa);
})();