Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(".map img").mouseenter(function() {
- $(".hover").find("p").html($(this).attr("alt"));
- $(".hover").find("img").attr("src", "images/full/" + $(this).attr("id") + ".jpg");
- $(".hover").css("display", "block");
- $(".hover").css("opacity", "1");
- $(".hover").css("left", $(this).position().left - $(".hover").width()/2 + $(this).width()/2);
- $(".hover").css("top", $(this).position().top - $(".hover").height()/2 + $(this).height()/2);
- });
- $(".hover").mouseleave(function() {
- $(".hover").css("opacity", "0").css("display", "none");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement