Hi,
I am a web designer just beginning to learn javascript. I'm trying to get the hover tooltip to appear on the right and top of the mouse instead of on the left and bottom. Here's the link: http://rockthedenim.com/store/
I tried modifying the following code with no success. Any help would be greatly appreciated:
Code:
function kriesi_tooltip(selector, selectname, atrribute){
jQuery(selector).each(function(i){
if (jQuery(this).attr(atrribute) != ""){
jQuery("body").append("<div class='"+selectname+"' id='"+selectname+i+"'><div><img class='tooltipimg' src='"+jQuery(this).attr(atrribute)+"' alt='' /></div><span><img src='"+ templateurl +"grafx/store/tooltip-trans.png' alt='' /></span</div>");
jQuery(this).removeAttr(atrribute).mouseover(function(e){
jQuery("#"+selectname+i).css({display:"none", visibility:"visible"}).fadeIn(400);
}).mousemove(function(e){
jQuery("#"+selectname+i).css({left:e.pageX+1, top:e.pageY+0});
}).mouseout(function(){
jQuery("#"+selectname+i).css({display:"none", visibility:"hidden"});
});
Thank you,
Rob
|