jQuery ImgHoverOverviewImgHover is a simple way to use hovering image on your site. You can use fade effect to switch hovering images as well. UsageIf you want to provide hovering behaviour to all the images, you can write simply like below; $(document).ready(function(){
$('img').imghover();
});<img src="/your/path/original.gif" /> When mouse-over this image, file "/your/path/original_o.gif" shows on the element. Bulk SettingYou can call this method on the elements other than images as well. $(document).ready(function(){
$('div.image-container').imghover();
});In this case, ImgHover provides the function to the images under 'image-container' element. OptionsprefixCreate hovered image by original image name and prefix. $('img').imghover({prefix: 'hover/'});<img src="/your/path/image1.gif" /> In this case, "/your/path/hover/image1.gif" will be provided as hovered image. Default value is null. suffixCreate hovered image by original image name and suffix. $('img').imghover({suffix: '-hovered'});<img src="/your/path/image1.gif" /> In this case, "/your/path/image1-hovered.gif" will be provided as hovered image. Default value is 'o'. # for my colleagues ;-p srcSpecify hovered image. Defautl value is null. btnOnlyWhen ImgHover was called to container element(s), the function find only <input TYPE="IMAGE"> or with anchor link. This option is useful to avoid empty gif, site logo and so on. Default value is true. fadeYou can use fade effect to switch images. Default value is false. fadeSpeedThe speed of fade effect. Default value is 500.
|