I’m using jquery/javascript to work with a hoverover that should follow the users mouse around over an image map. It works but one direction it’s fine (to the left) but when you go to the right it’s reallly really jumpy. I’ve made a video showing the problem here:
http://screencast.com/t/rnm1jUkvv8P
Heres my code:
if (sPage == "fireplan.aspx") {
jQuery('area').mousemove(function(e) { deshowtooltip(e, this) });
// jQuery('area').mousemove(function(e) { demovetooltip(e) });
jQuery('area').mouseout(function() {
jQuery('#tooltipwindow').empty();
delasturl = '';
});
}
function deshowtooltip(e, element) {
var url = jQuery(element).attr(‘tooltiphref’);if (delasturl != url) { jQuery('#tooltipwindow').empty(); jQuery('#tooltipwindow').load('tooltip.aspx?soid=' + url); delasturl = url; } var $this = jQuery(element); $this.data('title', $this.attr('title')); $this.removeAttr('title'); jQuery("#tooltipwindow").css("position", "fixed").css("top", (e.pageY - jQuery(window).scrollTop()) + "px").css("left", (e.pageX) + > "px").css("display", "none").show(); }function demovetooltip(e) { jQuery(“#tooltipwindow”)
.css(“top”, (e.pageY – jQuery(window).scrollTop()) + “px”)
.css(“left”, (e.pageX) + “px”); }
One other thing, the hyperlink clickthroughs seems to be disabled now i’ve done this hover over?
Tom
I worked it out… I just moved the hover over away from the mouse a little bit