简体   繁体   中英

Magento Image Rollover Effect

I want to create a rollover image effect on magento product page and I was wondering if you can point me to a tutorial or extension or perhaps help me with the code. 在此处输入图片说明

You can do a simple mouseover function using Jquery or Javascript. Just insert it into the main template. For more info please post more information or a link to a live site.

something like this where img represents the class or id of the images desired for the rollover.

$(function() {

$("img")
    .mouseover(function() { 
        $(this).attr("src", newImageUrl);
    })
    .mouseout(function() {
        var = $(this).attr("src").replace("over.gif", ".gif");
        $(this).attr("src", src);
    });
});`

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM