Jump to content

[SOLVED] Explanation how images changes in the product page?


YaKs

Recommended Posts

Hi,

Could someone tell me how the change of the images is done in the product page? I am been debugging with firebug and there is an onmouseover event that change the image but I cannot see in which point it is link with the img. I saw that there is a class called 'shown' that it is assigned to the anchor to mark when it is visible




but there is no onmouseover event link the anchor...

could someone help me out to understand how does it work?
I am trying to visualize several products in the same page and 'change image' effect only works for the first product.

http://v2.muertosdearte.com/category.php?id_category=6

thanks a lot.
jose

Link to comment
Share on other sites

Thanks Rocky,
I figured out yesterday night. I have been struggling with jQuery how to go through the whole DOM tree and register the method displayImage for each 'view_block li a' element. I didnt know how to make a loop so what I did is to set a maximum of 5 product in the category list and create manually 5 hover hooks...

    //hover 'other views' images management
   $('#views_block1 li a').hover(
       function(){displayImage($(this),1);},
       function(){}
   );

       //hover 'other views' images management
   $('#views_block2 li a').hover(
       function(){            
           displayImage($(this),2);},
       function(){}
   );
.....



the I put a counter in category.php and create those view_block[index]... and it works!

http://v2.muertosdearte.com/category.php?id_category=6

thanks anyway for the fast reply

cheers!
Jose

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...