Note that there are some explanatory texts on larger screens.

plurals
  1. POTo half the size of image on hover for what I have so far do I use a var
    text
    copied!<p>This is a 24 hr trial site of what I'm doing <br> <a href="http://trialsites.ihoststudio.com/trialsite361583/website/" rel="nofollow">http://trialsites.ihoststudio.com/trialsite361583/website/</a> <br><br> If you view generated source you'll see I'm working inside a program that I am <br> removing attributes then adding my own, then adding a class <br> Then I'm using hover to preview the image before I go to fancybox on the click <br> (which is why I did the live trial - easier to show you) <br><br> My question is how do I make that hover image half size but I keep getting errors <br>I'm assuming it's a var but I'm new at jQuery and lucky I've got this far <br><br> is it var img / 2 then apply that or do you use .css('img', e. / 2) just before .appendTo I don't seem to get it to work? <br> --------------------added code------------ <br><br></p> <pre><code>$(document).ready(function() { var offsetX = 20; var offsetY = 10; $('[id^=TMBOBJ]').each(function() { var $a = $(this).find('a'); $a.attr('href' , $a.attr('href').replace('html', 'jpg')); $a.removeAttr('onclick'); $a.removeAttr('target'); $a.addClass("nextfancy"); $a.attr('rel', 'group') }); $('a.nextfancy').hover(function(e) { var href = $(this).attr('href'); $('&lt;img id="largeImage" src="' + href + '" alt="big image" /&gt;') .css('top', e.pageY + offsetY) .css('left', e.pageX + offsetX) .appendTo('body'); }, function() { $('#largeImage').remove(); }); $('a.nextfancy').mousemove(function(e) { $("#largeImage").css('top', e.pageY + offsetY).css('left', e.pageX + offsetX); }); $("a.nextfancy").fancybox({ 'transitionIn': 'elastic', 'transitionOut': 'elastic', 'overlayColor': '#000000', 'titlePosition': 'inside' }); }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload