Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <a href='big.jpg'>
  2. <img src='mini.jpg' alt='a kitten'>
  3. <span>Click to view larger</span>
  4. </a>
  5.  
  6. a > img + span {display: none}
  7. a:hover > img + span {display: inline}
  8.  
  9. $('img.zoomthis').mouseover(function(){
  10. var pos = $(this).position();
  11. $('#zoomcursor').css("position","absolute");
  12. $('#zoomcursor').css("top",pos.top+18);//You have to change this in order to place it right over your image
  13. $('#zoomcursor').css("left",$(obj).width()-30); //this too
  14. $('#zoomcursor').show();
  15. }).mouseout(function(){
  16. $('#zoomcursor').hide();
  17. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement