OK, so I’ve got this simple jQuery tooltip image preview configured over here.
Works perfectly as it was intended. My problem is that I’m trying to do something outside of the box with it and I’m at the limits of my jQuery knowledge (which isn’t much mind you).
So, you see what I currently have. Now if you look at the source, you’ll see that I have another div (#popup) below the image. This div is hidden with display: none; via CSS. What I now need to do is tell the jQuery use the #popup div for the hover image rather than what’s in the rel attribute of the anchor tag. Is that possible? I just need to keep everything exactly the same visually while making that one change to use #popup as the hover image.
I know it probably doesn’t make sense so I’ll try to explain and maybe there’s even a much easier (better) way?
For this site I’m going to have one image in which I’ll use in multiple locations on the site and at three different sizes. To accomplish this, I’ll be using Image Sizer.
In this particular section, the image will be re-sized to around 50px x 30px with Image Sizer plugin. So, pretty small. This is where the jQuery comes in. I need the jQuery to show the #popup div which will include the hover image because the image inside of #popup I’ll also be using Image Sizer on and resizing it to around 220px x 125px. I realize I could simply use the jQuery plugin in it’s current form and resize the image manually by doing something like this:
$("body").append(""+ this.rel +");
But the problem I’ll run into with setting the width and height manually and not using ImageSizer is that the images will likely be grainy and distorted. ImageSizer seems to do come calculations or something that allow you resize an image without loss of quality that you normally would by manually adding width and height attributes to the img tag.
Hopefully this makes sense? I can follow up with any details if I wasn’t clear on anything.
Thanks