How do I hide and show or toggle between a picture (cover pic) and gallery. E.g I have a picture and when I click 'show gallery' the pic transform into a gallery and when i click 'hide gallery' the gallery transforn back into the pic?
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
Hi, Amari! You can add some code for page with image, gallery, button added e.g. and you will be able to switch image and gallery
$w.onReady(function () { $w("#gallery1").hide(); }); export function button1_click(event, $w) { if($w("#image1").isVisible){ $w("#gallery1").show(); $w("#image1").hide(); $w("#button1").label = "Back into the pic"; } else{ $w("#image1").show(); $w("#gallery1").hide(); $w("#button1").label = "Show Gallery"; } }
In addition maybe it is better to use Dynamic pages approach https://support.wix.com/en/article/about-dynamic-pages and https://support.wix.com/en/article/how-to-add-a-dynamic-category-page