I have searched this topic and although I have found similar situations I was unable to apply it to my specific needs. I have a plugin for a wordpress site which enables me to display an image as a tooltip on a link hover. It works perfectly, the only problem I am having is that I want every image tooltip to have a fixed position on the page which doesn't change regardless of the location of the mouse/link on the hover. Right now the tooltip follows the mouse on whichever link I choose. For reference, I am trying it function like the hover images on this site: http://www.themorrisongallery.com/artists.html where there is a stationary fixed location which shows the image on the mouseover.
This is the plugin that I am using: http://smartcatdesign.net/wp-tooltip-with-images-free-wordpress-plugin/
Here is what the CSS currently looks like:
.sc-tooltip-wrapper{ width: auto; height: auto; float: right; margin: 0px; background: #ffffff; color: #333333; z-index: 9999; display: none; overflow: hidden; position: absolute; top: -50px; .sc-tooltip-wrapper img{ float: right; width: auto; height: auto; position: relative; and here is what the script looks like:
jQuery(document).ready(function($) { var ctr = 0; $('.sc-tooltip').each(function() { ctr++; var tooltips = '<div id="sc-tooltip' + ctr + '-box" class="sc-tooltip-wrapper"><img src="' + $(this).attr('data-image') + '"/></div>'; $('body').append(tooltips); $(this).attr('id', 'sc-tooltip' + ctr); }); $('.sc-tooltip').hover(function(e) { var x = e.pageX; var y = e.pageY; var theId = '#' + $(this).attr('id') + '-box'; var leftOfset = $(theId).width(); $(theId).css({'left': x, 'top': y}); $(theId).fadeIn(200); }, function() { var theId = '#' + $(this).attr('id') + '-box'; $(theId).fadeOut(100); }); any suggestions would be very appreciated! I have been trying to set a fixed position using css and using the 'top' and 'left' attributes but everytime I do that the image just disappears from the page completely.