Hi–
Fairly new to Wix myself, but I am developing a page that will include information about a collectible card game on which, when you hover over the card title, a photo of the card will appear. I have this set up in a repeater so I can quickly add photos/card info and the code will do the rest.
The page loads too slowly now, so I’m not sure if it is the code that I have or something else entirely. Any help to better optimize this code and help it run faster would be helpful.
Thank you!
The page is www.worldtalkers.com/realms-cards
This is the code currently
From my understanding it compares the Title of the card to the repeater text box, if it matches, it pulls the appropriate photo into the website. Until it matches the information, it has my “Loading” image.
$w.onReady( function () {
$w("#image3").collapse();
$w("#repeater1").onItemReady( ($item, itemData, index) => {
$item("#text53").text = itemData.title;
$item("#image3").src = 'https://static.wixstatic.com/media/976f15_1355c1acb3054224837c655f2991781c~mv2.jpg'
$item("#text53").onMouseIn( (event) => {
$w("#image3").src = "https://static.wixstatic.com/media/976f15_1355c1acb3054224837c655f2991781c~mv2.jpg"
if ($item("#text53").text === itemData.title) {
$item("#image3").src = itemData.fullCard;
$item("#image3").expand();
$item("#image3").show();
} else {
$w("#image3").src = "https://static.wixstatic.com/media/976f15_1355c1acb3054224837c655f2991781c~mv2.jpg" }
$item("#text53").onMouseOut( (event) => {
$item("#image3").collapse();
$item("#image3").src = "https://static.wixstatic.com/media/976f15_1355c1acb3054224837c655f2991781c~mv2.jpg" } ); } ); } ); } );