How does the Image Hover jQuery plugin work? -


i use image hover plugin on website.

since have used jquery week, not skilled. following:

on website have sorts of thumbnails created shows previews of projects. want is, when come across picture "hovered" there pattern picture were. (this pattern @ images meant.) can me implement code?

this part of fade:

    if(opt.fade){       var offset = node.offset();       var hover = node.clone(true);       hover.attr('src', hoverimg);       hover.css({         position: 'absolute',         left: offset.left,         top: offset.top,         zindex: 1000       }).hide().insertafter(node);       node.mouseover(         function(){           var offset=node.offset();           hover.css({left: offset.left, top: offset.top});           hover.fadein(opt.fadespeed);           node.fadeout(opt.fadespeed,function(){node.show()});         }       );       hover.mouseout(         function(){           node.fadein(opt.fadespeed);           hover.fadeout(opt.fadespeed);         }       );     }else{       node.hover(         function(){node.attr('src', hoverimg)},         function(){node.attr('src', orgimg)}       );     } 

  1. not sure mean ... what want is, when come across picture "hovered" there pattern picture were. (this pattern @ images meant.) sentence not make sense me. please clarify...

  2. i don't see why need rewrite plugin internals.

  3. if understanding correctly, want use single custom image part of src attribute pass imghover plugin. that, make sure it's in right place , specify full path it.

    so, example, have image in /images/image01.png , hover image going used images in /images/hover.png, ... $("img").imghover({src:"/images/hover.png"}); in window load event handler or $(function() {...} jquery equivalent.

    again, make sure include full path. instead of hover.png.

see example did here. had bring in full source of imghover , plop in inline script since reason can't have stream directly repository, didn't modify inside plugin.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -