I created a blog using a dynamic page. The dynamic page displays two different article structures/templates:
A standard typical blog article structure
A list structure (e.g. top 25 shoes to buy this summer).
Using collapsible elements, my dynamic page shows one "template" and hides the other, depending on which cells have content in my database.
Everything works fine on the desktop version of my dynamic blog article pages, however, on the mobile version, it's not collapsing the elements that are linked to empty cells in my database. Instead, I'm getting these big empty spaces on the mobile version of my dynamic blog article pages.
When I first published last week, the mobile version of my dynamic blog pages were working normally as expected. I then edited the height of my strips on Friday and that's when the problem arose.
I've tried troubleshooting the problem by emptying my cache, using different devices and browsers, etc. to no avail. The problem isn't due to the 70/10 rule either as it works fine on desktop, and I've also double-clicked the adjust page height button on the footer.
Now I'm not an expert when it comes to wix code (more of a trial and error copy pasta kind of coder atm) and I do have a lot of code on my dynamic page (around 1600 lines). Most of this code is repetitive (see below), so I'm wondering if maybe that has something to do with my problem (or maybe it's just not structured properly and could be streamlined in some way.
Or perhaps it has something to do with the way I'm using the onReady functions.
Anyway, I thought I'd put my code up here to see if a real expert has any solutions or suggestions!
Here is a link to one of my dynamic blog page articles:
Here is my code:
import wixWindow from 'wix-window'; $w.onReady(function () { if(wixWindow.formFactor === "Mobile"){ $w("#line11").expand(); $w("#text88").expand(); $w("#box46").expand(); } $w('#columnStrip18').hide(); $w('#columnStrip7').show(); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.subtitle) { $w("#ListStrip").show(); $w("#columnStrip176").show(); } else { $w("#ListStrip").collapse(); $w("#ListStrip").hide(); $w("#columnStrip176").collapse(); $w("#columnStrip176").hide(); } } ); $w.onReady( () => { $w("#BodyImage3").fitMode = "fixedWidth"; $w("#SoloImage").fitMode = "fixedWidth"; $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.body1) { $w("#columnStrip173").show(); $w("#Body1").show(); $w("#BlankColumn2").show(); } else { $w("#Body1").collapse(); $w("#Body1").hide(); $w("#columnStrip173").collapse(); $w("#columnStrip173").hide(); $w("#BlankColumn2").collapse(); $w("#BlankColumn2").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.blog1LinkText) { $w("#body1Button").show(); $w("#columnStrip174").show(); } else { $w("#columnStrip174").collapse() $w("#columnStrip174").hide(); $w("#body1Button").collapse(); $w("#body1Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.bodyImage1) { $w("#BodyImage1").show(); } else { $w("#BodyImage1").collapse(); $w("#BodyImage1").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.bodyImage2) { $w("#BodyImage2").show(); $w("#columnStrip8").show(); $w("#columnStrip4").show(); } else { $w("#BodyImage2").collapse(); $w("#BodyImage2").hide(); $w("#columnStrip8").collapse(); $w("#columnStrip8").hide(); $w("#columnStrip4").collapse(); $w("#columnStrip4").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.soloImage) { $w("#SoloImage").show(); $w("#BlankColumn3").show(); $w("#columnStrip9").show(); } else { $w("#SoloImage").collapse(); $w("#SoloImage").hide(); $w("#BlankColumn3").collapse(); $w("#BlankColumn3").hide(); $w("#columnStrip9").collapse(); $w("#columnStrip9").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.bodyImage1Caption) { $w("#BodyImage1Caption").show(); } else { $w("#BodyImage1Caption").collapse(); $w("#BodyImage1Caption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.bodyImage2Caption) { $w("#BodyImage2Caption").show(); } else { $w("#BodyImage2Caption").collapse(); $w("#BodyImage2Caption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.soloImageCaption) { $w("#SoloImageCaption").show(); } else { $w("#SoloImageCaption").collapse(); $w("#SoloImageCaption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.subtitle2) { $w("#ColumnStrip9").show(); $w("#BlankColumn4").show(); } else { $w("#ColumnStrip9").collapse(); $w("#ColumnStrip9").hide(); $w("#BlankColumn4").collapse(); $w("#BlankColumn4").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.body2) { $w("#ColumnStrip11").show(); $w("#BlankColumn5").show(); } else { $w("#ColumnStrip11").collapse(); $w("#ColumnStrip11").hide(); $w("#BlankColumn5").collapse(); $w("#BlankColumn5").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.blog2LinkText) { $w("#body2Button").show(); } else { $w("#body2Button").collapse(); $w("#body2Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.subtitle3) { $w("#ColumnStrip13").show(); $w("#BlankColumn6").show(); } else { $w("#ColumnStrip13").collapse(); $w("#ColumnStrip13").hide(); $w("#BlankColumn6").collapse(); $w("#BlankColumn6").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.body3) { $w("#ColumnStrip15").show(); $w("#BlankColumn7").show(); } else { $w("#ColumnStrip15").collapse(); $w("#ColumnStrip15").hide(); $w("#BlankColumn7").collapse(); $w("#BlankColumn7").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.body3LinkText) { $w("#body3Button").show(); } else { $w("#body3Button").collapse(); $w("#body3Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.excerpt) { $w("#ColumnStrip17").show(); $w("#BlankColumn8").show(); } else { $w("#ColumnStrip17").collapse(); $w("#ColumnStrip17").hide(); $w("#BlankColumn8").collapse(); $w("#BlankColumn8").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.subtitle4) { $w("#ColumnStrip19").show(); $w("#BlankColumn9").show(); } else { $w("#ColumnStrip19").collapse(); $w("#ColumnStrip19").hide(); $w("#BlankColumn9").collapse(); $w("#BlankColumn9").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.body4) { $w("#ColumnStrip21").show(); $w("#BlankColumn10").show(); } else { $w("#ColumnStrip21").collapse(); $w("#ColumnStrip21").hide(); $w("#BlankColumn10").collapse(); $w("#BlankColumn10").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.body4LinkText) { $w("#body4Button").show(); } else { $w("#body4Button").collapse(); $w("#body4Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.bodyImage3) { $w("#ColumnStrip23").show(); $w("#BlankColumn11").show(); } else { $w("#ColumnStrip23").collapse(); $w("#ColumnStrip23").hide(); $w("#BlankColumn11").collapse(); $w("#BlankColumn11").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.bodyImage3Caption) { $w("#BodyImage3Caption").show(); } else { $w("#BodyImage3Caption").collapse(); $w("#BodyImage3Caption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.body5) { $w("#ColumnStrip2").show(); $w("#columnStrip24").show(); } else { $w("#ColumnStrip2").collapse(); $w("#ColumnStrip2").hide(); $w("#columnStrip24").collapse(); $w("#columnStrip24").hide(); } } ); } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.body5LinkText) { $w("#body5Button").show(); } else { $w("#body5Button").collapse(); $w("#body5Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody1Title) { $w("#columnStrip22").show(); $w("#columnStrip23").show(); } else { $w("#columnStrip22").collapse(); $w("#columnStrip22").hide(); $w("#columnStrip23").collapse(); $w("#columnStrip23").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody1) { $w("#columnStrip19").show(); $w("#columnStrip20").show(); } else { $w("#columnStrip19").collapse(); $w("#columnStrip19").hide(); $w("#columnStrip20").collapse(); $w("#columnStrip20").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody1LinkText) { $w("#ListBody1Button").show(); } else { $w("#ListBody1Button").collapse(); $w("#ListBody1Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody1Image) { $w("#columnStrip21").show(); $w("#columnStrip25").show(); } else { $w("#columnStrip21").collapse(); $w("#columnStrip21").hide(); $w("#columnStrip25").collapse(); $w("#columnStrip25").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody1ImageCaption) { $w("#ListBody1ImageCaption").show(); } else { $w("#ListBody1ImageCaption").collapse(); $w("#ListBody1ImageCaption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody2Title) { $w("#columnStrip26").show(); $w("#columnStrip27").show(); } else { $w("#columnStrip26").collapse(); $w("#columnStrip26").hide(); $w("#columnStrip27").collapse(); $w("#columnStrip27").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody2) { $w("#columnStrip28").show(); $w("#columnStrip29").show(); } else { $w("#columnStrip28").collapse(); $w("#columnStrip28").hide(); $w("#columnStrip29").collapse(); $w("#columnStrip29").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody2LinkText) { $w("#ListBody2Button").show(); } else { $w("#ListBody2Button").collapse(); $w("#ListBody2Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody2Image) { $w("#columnStrip30").show(); $w("#columnStrip31").show(); } else { $w("#columnStrip30").collapse(); $w("#columnStrip30").hide(); $w("#columnStrip31").collapse(); $w("#columnStrip31").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody2ImageCaption) { $w("#ListBody2ImageCaption").show(); } else { $w("#ListBody2ImageCaption").collapse(); $w("#ListBody2ImageCaption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody3Title) { $w("#columnStrip32").show(); $w("#columnStrip33").show(); } else { $w("#columnStrip32").collapse(); $w("#columnStrip32").hide(); $w("#columnStrip33").collapse(); $w("#columnStrip33").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody3) { $w("#columnStrip34").show(); $w("#columnStrip35").show(); } else { $w("#columnStrip34").collapse(); $w("#columnStrip34").hide(); $w("#columnStrip35").collapse(); $w("#columnStrip35").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody3LinkText) { $w("#ListBody3Button").show(); } else { $w("#ListBody3Button").collapse(); $w("#ListBody3Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody3Image) { $w("#columnStrip36").show(); $w("#columnStrip37").show(); } else { $w("#columnStrip36").collapse(); $w("#columnStrip36").hide(); $w("#columnStrip37").collapse(); $w("#columnStrip37").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody3Caption) { $w("#ListBody3ImageCaption").show(); } else { $w("#ListBody3ImageCaption").collapse(); $w("#ListBody3ImageCaption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody4Title) { $w("#columnStrip38").show(); $w("#columnStrip39").show(); } else { $w("#columnStrip38").collapse(); $w("#columnStrip38").hide(); $w("#columnStrip39").collapse(); $w("#columnStrip39").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody4) { $w("#columnStrip40").show(); $w("#columnStrip41").show(); } else { $w("#columnStrip40").collapse(); $w("#columnStrip40").hide(); $w("#columnStrip41").collapse(); $w("#columnStrip41").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody4LinkText) { $w("#ListBody4Button").show(); } else { $w("#ListBody4Button").collapse(); $w("#ListBody4Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody4Image) { $w("#columnStrip42").show(); $w("#columnStrip43").show(); } else { $w("#columnStrip42").collapse(); $w("#columnStrip42").hide(); $w("#columnStrip43").collapse(); $w("#columnStrip43").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody4Caption) { $w("#ListBody4Caption").show(); } else { $w("#ListBody4Caption").collapse(); $w("#ListBody4Caption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody5Title) { $w("#columnStrip44").show(); $w("#columnStrip45").show(); } else { $w("#columnStrip44").collapse(); $w("#columnStrip44").hide(); $w("#columnStrip45").collapse(); $w("#columnStrip45").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody5) { $w("#columnStrip46").show(); $w("#columnStrip47").show(); } else { $w("#columnStrip46").collapse(); $w("#columnStrip46").hide(); $w("#columnStrip47").collapse(); $w("#columnStrip47").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody5LinkText) { $w("#ListBody5Button").show(); } else { $w("#ListBody5Button").collapse(); $w("#ListBody5Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody5Image) { $w("#columnStrip48").show(); $w("#columnStrip49").show(); } else { $w("#columnStrip48").collapse(); $w("#columnStrip48").hide(); $w("#columnStrip49").collapse(); $w("#columnStrip49").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody5ImageCaption) { $w("#ListBody5ImageCaption").show(); } else { $w("#ListBody5ImageCaption").collapse(); $w("#ListBody5ImageCaption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody6Title) { $w("#columnStrip50").show(); $w("#columnStrip51").show(); } else { $w("#columnStrip50").collapse(); $w("#columnStrip50").hide(); $w("#columnStrip51").collapse(); $w("#columnStrip51").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody6) { $w("#columnStrip52").show(); $w("#columnStrip53").show(); } else { $w("#columnStrip52").collapse(); $w("#columnStrip52").hide(); $w("#columnStrip53").collapse(); $w("#columnStrip53").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody6LinkText) { $w("#ListBody6Button").show(); } else { $w("#ListBody6Button").collapse(); $w("#ListBody6Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody6Image) { $w("#columnStrip54").show(); $w("#columnStrip55").show(); } else { $w("#columnStrip54").collapse(); $w("#columnStrip54").hide(); $w("#columnStrip55").collapse(); $w("#columnStrip55").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody6Caption) { $w("#ListBody6ImageCaption").show(); } else { $w("#ListBody6ImageCaption").collapse(); $w("#ListBody6ImageCaption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody7Title) { $w("#columnStrip56").show(); $w("#columnStrip57").show(); } else { $w("#columnStrip56").collapse(); $w("#columnStrip56").hide(); $w("#columnStrip57").collapse(); $w("#columnStrip57").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody7) { $w("#columnStrip58").show(); $w("#columnStrip59").show(); } else { $w("#columnStrip58").collapse(); $w("#columnStrip58").hide(); $w("#columnStrip59").collapse(); $w("#columnStrip59").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody7LinkText) { $w("#ListBody7Button").show(); } else { $w("#ListBody7Button").collapse(); $w("#ListBody7Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody7Image) { $w("#columnStrip60").show(); $w("#columnStrip61").show(); } else { $w("#columnStrip60").collapse(); $w("#columnStrip60").hide(); $w("#columnStrip61").collapse(); $w("#columnStrip61").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody7ImageCaption) { $w("#ListBody7ImageCaption").show(); } else { $w("#ListBody7ImageCaption").collapse(); $w("#ListBody7ImageCaption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody8Title) { $w("#columnStrip62").show(); $w("#columnStrip63").show(); } else { $w("#columnStrip62").collapse(); $w("#columnStrip62").hide(); $w("#columnStrip63").collapse(); $w("#columnStrip63").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody8) { $w("#columnStrip64").show(); $w("#columnStrip65").show(); } else { $w("#columnStrip64").collapse(); $w("#columnStrip64").hide(); $w("#columnStrip64").collapse(); $w("#columnStrip64").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody8LinkText) { $w("#ListBody8Button").show(); } else { $w("#ListBody8Button").collapse(); $w("#ListBody8Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody8Image) { $w("#columnStrip66").show(); $w("#columnStrip67").show(); } else { $w("#columnStrip66").collapse(); $w("#columnStrip66").hide(); $w("#columnStrip67").collapse(); $w("#columnStrip67").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody8ImageCaption) { $w("#ListBody8ImageCaption").show(); } else { $w("#ListBody8ImageCaption").collapse(); $w("#ListBody8ImageCaption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody9Title) { $w("#columnStrip68").show(); $w("#columnStrip69").show(); } else { $w("#columnStrip68").collapse(); $w("#columnStrip68").hide(); $w("#columnStrip69").collapse(); $w("#columnStrip69").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody9) { $w("#columnStrip70").show(); $w("#columnStrip71").show(); } else { $w("#columnStrip70").collapse(); $w("#columnStrip70").hide(); $w("#columnStrip71").collapse(); $w("#columnStrip71").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody9LinkText) { $w("#ListBody9Button").show(); } else { $w("#ListBody9Button").collapse(); $w("#ListBody9Button").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody9Image) { $w("#columnStrip72").show(); $w("#columnStrip73").show(); } else { $w("#columnStrip72").collapse(); $w("#columnStrip72").hide(); $w("#columnStrip73").collapse(); $w("#columnStrip73").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody9ImageCaption) { $w("#ListBody9ImageCaption").show(); } else { $w("#ListBody9ImageCaption").collapse(); $w("#ListBody9ImageCaption").hide(); } } ); $w("#dynamicDataset").onReady( () => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBody10Title) { $w("#columnStrip74").show(); $w("#columnStrip75").show(); } else { $w("#columnStrip74").collapse(); $w("#columnStrip74").hide(); $w("#columnStrip75").collapse(); $w("#columnStrip75").hide(); } } ); } );
(code carries on but is too long to pos here)
if (item.listBody21ImageCaption) { $w("#ListBody21ImageCaption").expand(); $w("#ListBody21ImageCaption").show('fade'); } else { $w("#ListBody21ImageCaption").hide('fade').then(()=>{ $w("#ListBody21ImageCaption").collapse(); }); } if (item.listBody22Title) { $w("#columnStrip146, #columnStrip147").expand(); $w("#columnStrip146, #columnStrip147").show('fade'); } else { $w("#columnStrip146, #columnStrip147").hide('fade').then(()=>{ $w("#columnStrip146, #columnStrip147").collapse(); }); } if (item.listBody22) { $w("#columnStrip148, #columnStrip149").expand(); $w("#columnStrip148, #columnStrip149").show('fade'); } else { $w("#columnStrip148, #columnStrip149").hide('fade').then(()=>{ $w("#columnStrip148, #columnStrip149").collapse(); }); } if (item.listBody22LinkText) { $w("#ListBody22Button").expand(); $w("#ListBody22Button").show('fade'); } else { $w("#ListBody22Button").hide('fade').then(()=>{ $w("#ListBody22Button").collapse(); }); } if (item.listBody22Image) { $w("#columnStrip150, #columnStrip151").expand(); $w("#columnStrip150, #columnStrip151").show('fade'); } else { $w("#columnStrip150, #columnStrip151").hide('fade').then(()=>{ $w("#columnStrip150, #columnStrip151").collapse(); }); } if (item.listBody22ImageCaption) { $w("#ListBody22ImageCaption").expand(); $w("#ListBody22ImageCaption").show('fade'); } else { $w("#ListBody22ImageCaption").hide('fade').then(()=>{ $w("#ListBody22ImageCaption").collapse(); }); } if (item.listBody23Title) { $w("#columnStrip152, #columnStrip153").expand(); $w("#columnStrip152, #columnStrip153").show('fade'); } else { $w("#columnStrip152, #columnStrip153").hide('fade').then(()=>{ $w("#columnStrip152, #columnStrip153").collapse(); }); } if (item.listBody23) { $w("#columnStrip154, #columnStrip155").expand(); $w("#columnStrip154, #columnStrip155").show('fade'); } else { $w("#columnStrip154, #columnStrip155").hide('fade').then(()=>{ $w("#columnStrip154, #columnStrip155").collapse(); }); } if (item.listBody23LinkText) { $w("#ListBody23Button").expand(); $w("#ListBody23Button").show('fade'); } else { $w("#ListBody23Button").hide('fade').then(()=>{ $w("#ListBody23Button").collapse(); }); } if (item.listBody23Image) { $w("#columnStrip156, #columnStrip157").expand(); $w("#columnStrip156, #columnStrip157").show('fade'); } else { $w("#columnStrip156, #columnStrip157").hide('fade').then(()=>{ $w("#columnStrip156, #columnStrip157").collapse(); }); } if (item.listBody23ImageCaption) { $w("#ListBody23ImageCaption").expand(); $w("#ListBody23ImageCaption").show('fade'); } else { $w("#ListBody23ImageCaption").hide('fade').then(()=>{ $w("#ListBody23ImageCaption").collapse(); }); if (item.listBody24Title) { $w("#columnStrip158, #columnStrip159").expand(); $w("#columnStrip158, #columnStrip159").show('fade'); } else { $w("#columnStrip158, #columnStrip159").hide('fade').then(()=>{ $w("#columnStrip158, #columnStrip159").collapse(); }); } if (item.listBody24) { $w("#columnStrip160, #columnStrip161").expand(); $w("#columnStrip160, #columnStrip161").show('fade'); } else { $w("#columnStrip160, #columnStrip161").hide('fade').then(()=>{ $w("#columnStrip160, #columnStrip161").collapse(); }); } if (item.listBody24LinkText) { $w("#ListBody24Button").expand(); $w("#ListBody24Button").show('fade'); } else { $w("#ListBody24Button").hide('fade').then(()=>{ $w("#ListBody24Button").collapse(); }); } if (item.listBody24Image) { $w("#columnStrip162, #columnStrip163").expand(); $w("#columnStrip162, #columnStrip163").show('fade'); } else { $w("#columnStrip162, #columnStrip163").hide('fade').then(()=>{ $w("#columnStrip162, #columnStrip163").collapse(); }); } if (item.listBody24ImageCaption) { $w("#ListBody24ImageCaption").expand(); $w("#ListBody24ImageCaption").show('fade'); } else { $w("#ListBody24ImageCaption").hide('fade').then(()=>{ $w("#ListBody24ImageCaption").collapse(); }); } if (item.listBody25Title) { $w("#columnStrip164, #columnStrip165").expand(); $w("#columnStrip164, #columnStrip165").show('fade'); } else { $w("#columnStrip164, #columnStrip165").hide('fade').then(()=>{ $w("#columnStrip164, #columnStrip165").collapse(); }); } if (item.listBody25) { $w("#columnStrip166, #columnStrip167").expand(); $w("#columnStrip166, #columnStrip167").show('fade'); } else { $w("#columnStrip166, #columnStrip167").hide('fade').then(()=>{ $w("#columnStrip166, #columnStrip167").collapse(); }); } if (item.listBody2LinkText) { $w("#ListBody25Button").expand(); $w("#ListBody25Button").show('fade'); } else { $w("#ListBody25Button").hide('fade').then(()=>{ $w("#ListBody25Button").collapse(); }); } if (item.listBody25Image) { $w("#columnStrip168, #columnStrip169").expand(); $w("#columnStrip168, #columnStrip169").show('fade'); } else { $w("#columnStrip168, #columnStrip169").hide('fade').then(()=>{ $w("#columnStrip168, #columnStrip169").collapse(); }); } if (item.listBody25ImageCaption) { $w("#ListBody25ImageCaption").expand(); $w("#ListBody25ImageCaption").show('fade'); } else { $w("#ListBody25ImageCaption").hide('fade').then(()=>{ $w("#ListBody25ImageCaption").collapse(); }); } if (item.listBodySummaryTitle) { $w("#columnStrip170, #columnStrip171").expand(); $w("#columnStrip170, #columnStrip171").show('fade'); } else { $w("#columnStrip170, #columnStrip171").hide('fade').then(()=>{ $w("#columnStrip170, #columnStrip171").collapse(); }); } if (item.listBodySummary) { $w("#columnStrip172, #BlankColumn12").expand(); $w("#columnStrip172, #BlankColumn12").show('fade'); } else { $w("#columnStrip172, #BlankColumn12").hide('fade').then(()=>{ $w("#columnStrip172, #BlankColumn12").collapse(); }); } }})});
if (item.listBody16) { $w("#columnStrip112, #columnStrip113").expand(); $w("#columnStrip112, #columnStrip113").show('fade'); } else { $w("#columnStrip112, #columnStrip113").hide('fade').then(()=>{ $w("#columnStrip112, #columnStrip113").collapse(); }); } if (item.listBody16LinkText) { $w("#ListBody16Button").expand(); $w("#ListBody16Button").show('fade'); } else { $w("#ListBody16Button").hide('fade').then(()=>{ $w("#ListBody16Button").collapse(); }); } if (item.listBody16Image) { $w("#columnStrip114, #columnStrip115").expand(); $w("#columnStrip114, #columnStrip115").show('fade'); } else { $w("#columnStrip114, #columnStrip115").hide('fade').then(()=>{ $w("#columnStrip114, #columnStrip115").collapse(); }); } if (item.listBody16ImageCaption) { $w("#ListBody16ImageCaption").expand(); $w("#ListBody16ImageCaption").show('fade'); } else { $w("#ListBody16ImageCaption").hide('fade').then(()=>{ $w("#ListBody16ImageCaption").collapse(); }); } if (item.listBody17Title) { $w("#columnStrip116, #columnStrip117").expand(); $w("#columnStrip116, #columnStrip117").show('fade'); } else { $w("#columnStrip116, #columnStrip117").hide('fade').then(()=>{ $w("#columnStrip116, #columnStrip117").collapse(); }); } if (item.listBody17) { $w("#columnStrip118, #columnStrip119").expand(); $w("#columnStrip118, #columnStrip119").show('fade'); } else { $w("#columnStrip118, #columnStrip119").hide('fade').then(()=>{ $w("#columnStrip118, #columnStrip119").collapse(); }); } if (item.listBody17LinkText) { $w("#ListBody17Button").expand(); $w("#ListBody17Button").show('fade'); } else { $w("#ListBody17Button").hide('fade').then(()=>{ $w("#ListBody17Button").collapse(); }); } if (item.listBody17Image) { $w("#columnStrip120, #columnStrip121").expand(); $w("#columnStrip120, #columnStrip121").show('fade'); } else { $w("#columnStrip120, #columnStrip121").hide('fade').then(()=>{ $w("#columnStrip120, #columnStrip121").collapse(); }); } if (item.listBody17ImageCaption) { $w("#ListBody17ImageCaption").expand(); $w("#ListBody17ImageCaption").show('fade'); } else { $w("#ListBody17ImageCaption").hide('fade').then(()=>{ $w("#ListBody17ImageCaption").collapse(); }); } if (item.listBody18Title) { $w("#columnStrip122, #columnStrip123").expand(); $w("#columnStrip122, #columnStrip123").show('fade'); } else { $w("#columnStrip122, #columnStrip123").hide('fade').then(()=>{ $w("#columnStrip122, #columnStrip123").collapse(); }); } if (item.listBody18) { $w("#columnStrip124, #columnStrip125").expand(); $w("#columnStrip124, #columnStrip125").show('fade'); } else { $w("#columnStrip124, #columnStrip125").hide('fade').then(()=>{ $w("#columnStrip124, #columnStrip125").collapse(); }); } if (item.listBody18LinkText) { $w("#ListBody18Button").expand(); $w("#ListBody18Button").show('fade'); } else { $w("#ListBody18Button").hide('fade').then(()=>{ $w("#ListBody18Button").collapse(); }); } if (item.listBody18Image) { $w("#columnStrip126, #columnStrip127").expand(); $w("#columnStrip126, #columnStrip127").show('fade'); } else { $w("#columnStrip126, #columnStrip127").hide('fade').then(()=>{ $w("#columnStrip126, #columnStrip127").collapse(); }); } if (item.listBody18ImageCaption) { $w("#ListBody18ImageCaption").expand(); $w("#ListBody18ImageCaption").show(); } else { $w("#ListBody18ImageCaption").hide('fade').then(()=>{ $w("#ListBody18ImageCaption").collapse(); }); } if (item.listBody19Title) { $w("#columnStrip128, #columnStrip129").expand(); $w("#columnStrip128, #columnStrip129").show('fade'); } else { $w("#columnStrip128, #columnStrip129").hide('fade').then(()=>{ $w("#columnStrip128, #columnStrip129").collapse(); }); } if (item.listBody19) { $w("#columnStrip130, #columnStrip131").expand(); $w("#columnStrip130, #columnStrip131").show('fade'); } else { $w("#columnStrip130, #columnStrip131").hide('fade').then(()=>{ $w("#columnStrip130, #columnStrip131").collapse(); }); } if (item.listBody19LinkText) { $w("#ListBody19Button").expand(); $w("#ListBody19Button").show('fade'); } else { $w("#ListBody19Button").hide('fade').then(()=>{ $w("#ListBody19Button").collapse(); }); } if (item.listBody19Image) { $w("#columnStrip132, #columnStrip133").expand(); $w("#columnStrip132, #columnStrip133").show('fade'); } else { $w("#columnStrip132, #columnStrip133").hide('fade').then(()=>{ $w("#columnStrip132, #columnStrip133").collapse(); }); } if (item.listBody19ImageCaption) { $w("#ListBody19ImageCaption").expand(); $w("#ListBody19ImageCaption").show('fade'); } else { $w("#ListBody19ImageCaption").hide('fade').then(()=>{ $w("#ListBody19ImageCaption").collapse(); }); } if (item.listBody20Title) { $w("#columnStrip134, #columnStrip135").expand(); $w("#columnStrip134, #columnStrip135").show('fade'); } else { $w("#columnStrip134, #columnStrip135").hide('fade').then(()=>{ $w("#columnStrip134, #columnStrip135").collapse(); }); } if (item.listBody20) { $w("#columnStrip136, #columnStrip137").expand(); $w("#columnStrip136, #columnStrip137").show('fade'); } else { $w("#columnStrip136, #columnStrip137").hide('fade').then(()=>{ $w("#columnStrip136, #columnStrip137").collapse(); }); } if (item.listBody20LinkText) { $w("#ListBody20Button").expand(); $w("#ListBody20Button").show('fade'); } else { $w("#ListBody20Button").hide('fade').then(()=>{ $w("#ListBody20Button").collapse(); }); } if (item.listBody20Image) { $w("#columnStrip138, #columnStrip139").expand(); $w("#columnStrip138, #columnStrip139").show('fade'); } else { $w("#columnStrip138, #columnStrip139").hide('fade').then(()=>{ $w("#columnStrip138, #columnStrip139").collapse(); }); } if (item.listBody20Caption) { $w("#ListBody20ImageCaption").expand(); $w("#ListBody20ImageCaption").show('fade'); } else { $w("#ListBody20ImageCaption").hide('fade').then(()=>{ $w("#ListBody20ImageCaption").collapse(); }); } if (item.listBody21Title) { $w("#columnStrip140, #columnStrip141").expand(); $w("#columnStrip140, #columnStrip141").show('fade'); } else { $w("#columnStrip140, #columnStrip141").hide('fade').then(()=>{ $w("#columnStrip140, #columnStrip141").collapse(); }); } if (item.listBody21) { $w("#columnStrip142, #columnStrip143").expand(); $w("#columnStrip142, #columnStrip143").show('fade'); } else { $w("#columnStrip142, #columnStrip143").hide('fade').then(()=>{ $w("#columnStrip142, #columnStrip143").collapse(); }); } if (item.listBody21LinkText) { $w("#ListBody21Button").expand(); $w("#ListBody21Button").show('fade'); } else { $w("#ListBody21Button").hide('fade').then(()=>{ $w("#ListBody21Button").collapse(); }); } if (item.listBody21Image) { $w("#columnStrip144, #columnStrip145").expand(); $w("#columnStrip144, #columnStrip145").show('fade'); } else { $w("#columnStrip144, #columnStrip145").hide('fade').then(()=>{ $w("#columnStrip144, #columnStrip145").collapse(); }); } continues in code part 6 below
if (item.listBody10ImageCaption) { $w("#ListBody10ImageCaption").expand(); $w("#ListBody10ImageCaption").show('fade'); } else { $w("#ListBody10ImageCaption").hide('fade').then(()=>{ $w("#ListBody10ImageCaption").collapse(); }); } if (item.listBody11Title) { $w("#columnStrip80, #columnStrip81").expand(); $w("#columnStrip80, #columnStrip81").show('fade'); } else { $w("#columnStrip80, #columnStrip81").hide('fade').then(()=>{ $w("#columnStrip80, #columnStrip81").collapse(); }); } if (item.listBody11) { $w("#columnStrip82, #columnStrip83").expand(); $w("#columnStrip82, #columnStrip83").show('fade'); } else { $w("#columnStrip82, #columnStrip83").hide('fade').then(()=>{ $w("#columnStrip82, #columnStrip83").collapse(); }); } if (item.listBody11LinkText) { $w("#ListBody11Button").expand(); $w("#ListBody11Button").show('fade'); } else { $w("#ListBody11Button").hide('fade').then(()=>{ $w("#ListBody11Button").collapse(); }); } if (item.listBody11Image) { $w("#columnStrip84, #columnStrip85").expand(); $w("#columnStrip84, #columnStrip85").show('fade'); } else { $w("#columnStrip84, #columnStrip85").hide('fade').then(()=>{ $w("#columnStrip84, #columnStrip85").collapse(); }); } if (item.listBody11ImageCaption) { $w("#ListBody11ImageCaption").expand(); $w("#ListBody11ImageCaption").show('fade'); } else { $w("#ListBody11ImageCaption").hide('fade').then(()=>{ $w("#ListBody11ImageCaption").collapse(); }); } if (item.listBody12Title) { $w("#columnStrip86, #columnStrip87").expand(); $w("#columnStrip86, #columnStrip87").show('fade'); } else { $w("#columnStrip86, #columnStrip87").hide('fade').then(()=>{ $w("#columnStrip86, #columnStrip87").collapse(); }); } if (item.listBody12) { $w("#columnStrip88, #columnStrip89").expand(); $w("#columnStrip88, #columnStrip89").show('fade'); } else { $w("#columnStrip88, #columnStrip89").hide('fade').then(()=>{ $w("#columnStrip88, #columnStrip89").collapse(); }); } if (item.listBody12LinkText) { $w("#ListBody12Button").expand(); $w("#ListBody12Button").show('fade'); } else { $w("#ListBody12Button").hide('fade').then(()=>{ $w("#ListBody12Button").collapse(); }); } if (item.listBody12Image) { $w("#columnStrip90, #columnStrip91").expand(); $w("#columnStrip90, #columnStrip91").show('fade'); } else { $w("#columnStrip90, #columnStrip91").hide('fade').then(()=>{ $w("#columnStrip90, #columnStrip91").collapse(); }); } if (item.listBody12ImageCaption) { $w("#ListBody12ImageCaption").expand(); $w("#ListBody12ImageCaption").show('fade'); } else { $w("#ListBody12ImageCaption").hide('fade').then(()=>{ $w("#ListBody12ImageCaption").collapse(); }); } if (item.listBody13Title) { $w("#columnStrip92, #columnStrip93").expand(); $w("#columnStrip92, #columnStrip93").show('fade'); } else { $w("#columnStrip92, #columnStrip93").hide('fade').then(()=>{ $w("#columnStrip92, #columnStrip93").collapse(); }); } if (item.listBody13) { $w("#columnStrip94, #columnStrip95").expand(); $w("#columnStrip94, #columnStrip95").show('fade'); } else { $w("#columnStrip94, #columnStrip95").hide('fade').then(()=>{ $w("#columnStrip94, #columnStrip95").collapse(); }); } if (item.listBody13LinkText) { $w("#ListBody13Button").expand(); $w("#ListBody13Button").show(); } else { $w("#ListBody13Button").hide('fade').then(()=>{ $w("#ListBody13Button").collapse(); }); } if (item.listBody13Image) { $w("#columnStrip96, #columnStrip97").expand(); $w("#columnStrip96, #columnStrip97").show('fade'); } else { $w("#columnStrip96, #columnStrip97").hide('fade').then(()=>{ $w("#columnStrip96, #columnStrip97").collapse(); }); } if (item.listBody13ImageCaption) { $w("#ListBody13ImageCaption").expand(); $w("#ListBody13ImageCaption").show('fade'); } else { $w("#ListBody13ImageCaption").hide('fade').then(()=>{ $w("#ListBody13ImageCaption").collapse(); }); } if (item.listBody14Title) { $w("#columnStrip98, #columnStrip99").expand(); $w("#columnStrip98, #columnStrip99").show('fade'); } else { $w("#columnStrip98, #columnStrip99").hide('fade').then(()=>{ $w("#columnStrip98, #columnStrip99").collapse(); }); } if (item.listBody14) { $w("#columnStrip100, #columnStrip101").expand(); $w("#columnStrip100, #columnStrip101").show('fade'); } else { $w("#columnStrip100, #columnStrip101").hide('fade').then(()=>{ $w("#columnStrip100, #columnStrip101").collapse(); }); } if (item.listBody14LinkText) { $w("#ListBody14Button").expand(); $w("#ListBody14Button").show('fade'); } else { $w("#ListBody14Button").hide('fade').then(()=>{ $w("#ListBody14Button").collapse(); }); } if (item.listBody14Image) { $w("#columnStrip102, #columnStrip103").expand(); $w("#columnStrip102, #columnStrip103").show('fade'); } else { $w("#columnStrip102, #columnStrip103").hide('fade').then(()=>{ $w("#columnStrip102, #columnStrip103").collapse(); }); } if (item.listBody14ImageCaption) { $w("#ListBody14ImageCaption").expand(); $w("#ListBody14ImageCaption").show('fade'); } else { $w("#ListBody14ImageCaption").hide('fade').then(()=>{ $w("#ListBody14ImageCaption").collapse(); }); } if (item.listBody15Title) { $w("#columnStrip104, #columnStrip105").expand(); $w("#columnStrip104, #columnStrip105").show('fade'); } else { $w("#columnStrip104, #columnStrip105").hide('fade').then(()=>{ $w("#columnStrip104, #columnStrip105").collapse(); }); } if (item.listBody15) { $w("#columnStrip106, #columnStrip107").expand(); $w("#columnStrip106, #columnStrip107").show('fade'); } else { $w("#columnStrip106, #columnStrip107").hide('fade').then(()=>{ $w("#columnStrip106, #columnStrip107").collapse(); }); } if (item.listBody15LinkText) { $w("#ListBody15Button").expand(); $w("#ListBody15Button").show('fade'); } else { $w("#ListBody15Button").hide('fade').then(()=>{ $w("#ListBody15Button").collapse(); }); } if (item.listBody15Image) { $w("#columnStrip108, #columnStrip109").expand(); $w("#columnStrip108, #columnStrip109").show('fade'); } else { $w("#columnStrip108, #columnStrip109").hide('fade').then(()=>{ $w("#columnStrip108, #columnStrip109").collapse(); }); } if (item.listBody15ImageCaption) { $w("#ListBody15ImageCaption").expand(); $w("#ListBody15ImageCaption").show('fade'); } else { $w("#ListBody15ImageCaption").hide('fade').then(()=>{ $w("#ListBody15ImageCaption").collapse(); }); } if (item.listBody16Title) { $w("#columnStrip110, #columnStrip111").expand(); $w("#columnStrip110, #columnStrip111").show('fade'); } else { $w("#columnStrip110, #columnStrip111").hide('fade').then(()=>{ $w("#columnStrip110, #columnStrip111").collapse(); }); } continues in code part 5 below
if (item.listBody3) { $w("#columnStrip34, #columnStrip35").expand(); $w("#columnStrip34, #columnStrip35").show('fade'); } else { $w("#columnStrip34, #columnStrip35").hide('fade').then(()=>{ $w("#columnStrip34, #columnStrip35").collapse(); }); } if (item.listBody3LinkText) { $w("#ListBody3Button").expand(); $w("#ListBody3Button").show('fade'); } else { $w("#ListBody3Button").hide('fade').then(()=>{ $w("#ListBody3Button").collapse(); }); } if (item.listBody3Image) { $w("#columnStrip36, #columnStrip37").expand(); $w("#columnStrip36, #columnStrip37").show('fade'); } else { $w("#columnStrip36, #columnStrip37").hide('fade').then(()=>{ $w("#columnStrip36, #columnStrip37").collapse(); }); } if (item.listBody3Caption) { $w("#ListBody3ImageCaption").expand(); $w("#ListBody3ImageCaption").show('fade'); } else { $w("#ListBody3ImageCaption").hide('fade').then(()=>{ $w("#ListBody3ImageCaption").collapse(); }); } if (item.listBody4Title) { $w("#columnStrip38, #columnStrip39").expand(); $w("#columnStrip38, #columnStrip39").show('fade'); } else { $w("#columnStrip38, #columnStrip39").hide('fade').then(()=>{ $w("#columnStrip38, #columnStrip39").collapse(); }); } if (item.listBody4) { $w("#columnStrip40, #columnStrip41").expand(); $w("#columnStrip40, #columnStrip41").show('fade'); } else { $w("#columnStrip40, #columnStrip41").hide('fade').then(()=>{ $w("#columnStrip40, #columnStrip41").collapse(); }); } if (item.listBody4LinkText) { $w("#ListBody4Button").expand(); $w("#ListBody4Button").show('fade'); } else { $w("#ListBody4Button").hide('fade').then(()=>{ $w("#ListBody4Button").collapse(); }); } if (item.listBody4Image) { $w("#columnStrip42, #columnStrip43").expand(); $w("#columnStrip42, #columnStrip43").show('fade'); } else { $w("#columnStrip42, #columnStrip43").hide('fade').then(()=>{ $w("#columnStrip42, #columnStrip43").collapse(); }); } if (item.listBody4Caption) { $w("#ListBody4Caption").expand(); $w("#ListBody4Caption").show('fade'); } else { $w("#ListBody4Caption").hide('fade').then(()=>{ $w("#ListBody4Caption").collapse(); }); } if (item.listBody5Title) { $w("#columnStrip44, #columnStrip45").expand(); $w("#columnStrip44, #columnStrip45").show('fade'); } else { $w("#columnStrip44, #columnStrip45").hide('fade').then(()=>{ $w("#columnStrip44, #columnStrip45").collapse(); }); } if (item.listBody5) { $w("#columnStrip46, #columnStrip47").expand(); $w("#columnStrip46, #columnStrip47").show('fade'); } else { $w("#columnStrip46, #columnStrip47").hide('fade').then(()=>{ $w("#columnStrip46, #columnStrip47").collapse(); }); } if (item.listBody5LinkText) { $w("#ListBody5Button").expand(); $w("#ListBody5Button").show('fade'); } else { $w("#ListBody5Button").hide('fade').then(()=>{ $w("#ListBody5Button").collapse(); }); } if (item.listBody5Image) { $w("#columnStrip48, #columnStrip49").expand(); $w("#columnStrip48, #columnStrip49").show('fade'); } else { $w("#columnStrip48, #columnStrip49").hide('fade').then(()=>{ $w("#columnStrip48, #columnStrip49").collapse(); }); } if (item.listBody5ImageCaption) { $w("#ListBody5ImageCaption").expand(); $w("#ListBody5ImageCaption").show('fade'); } else { $w("#ListBody5ImageCaption").hide('fade').then(()=>{ $w("#ListBody5ImageCaption").collapse(); }); } if (item.listBody6Title) { $w("#columnStrip50, #columnStrip51").expand(); $w("#columnStrip50, #columnStrip51").show('fade'); } else { $w("#columnStrip50, #columnStrip51").hide('fade').then(()=>{ $w("#columnStrip50, #columnStrip51").collapse(); }); } if (item.listBody6) { $w("#columnStrip52, #columnStrip53").expand(); $w("#columnStrip52, #columnStrip53").show('fade'); } else { $w("#columnStrip52, #columnStrip53").hide('fade').then(()=>{ $w("#columnStrip52, #columnStrip53").collapse(); }); } if (item.listBody6LinkText) { $w("#ListBody6Button").expand(); $w("#ListBody6Button").show('fade'); } else { $w("#ListBody6Button").hide('fade').then(()=>{ $w("#ListBody6Button").collapse(); }); } if (item.listBody6Image) { $w("#columnStrip54, #columnStrip55").expand(); $w("#columnStrip54, #columnStrip55").show('fade'); } else { $w("#columnStrip54, #columnStrip55").hide('fade').then(()=>{ $w("#columnStrip54, #columnStrip55").collapse(); }); } if (item.listBody6Caption) { $w("#ListBody6ImageCaption").expand(); $w("#ListBody6ImageCaption").show('fade'); } else { $w("#ListBody6ImageCaption").hide('fade').then(()=>{ $w("#ListBody6ImageCaption").collapse(); }); } if (item.listBody7Title) { $w("#columnStrip56, #columnStrip57").expand(); $w("#columnStrip56, #columnStrip57").show('fade'); } else { $w("#columnStrip56, #columnStrip57").hide('fade').then(()=>{ $w("#columnStrip56, #columnStrip57").collapse(); }); } if (item.listBody7) { $w("#columnStrip58, #columnStrip59").expand(); $w("#columnStrip58, #columnStrip59").show('fade'); } else { $w("#columnStrip58, #columnStrip59").hide('fade').then(()=>{ $w("#columnStrip58, #columnStrip59").collapse(); }); } if (item.listBody7LinkText) { $w("#ListBody7Button").expand(); $w("#ListBody7Button").show('fade'); } else { $w("#ListBody7Button").hide('fade').then(()=>{ $w("#ListBody7Button").collapse(); }); } if (item.listBody7Image) { $w("#columnStrip60, #columnStrip61").expand(); $w("#columnStrip60, #columnStrip61").show('fade'); } else { $w("#columnStrip60, #columnStrip61").hide('fade').then(()=>{ $w("#columnStrip60, #columnStrip61").collapse(); }); } if (item.listBody7ImageCaption) { $w("#ListBody7ImageCaption").expand(); $w("#ListBody7ImageCaption").show('fade'); } else { $w("#ListBody7ImageCaption").hide('fade').then(()=>{ $w("#ListBody7ImageCaption").collapse(); }); } if (item.listBody8Title) { $w("#columnStrip62, #columnStrip63").expand(); $w("#columnStrip62, #columnStrip63").show('fade'); } else { $w("#columnStrip62, #columnStrip63").hide('fade').then(()=>{ $w("#columnStrip62, #columnStrip63").collapse(); }); } if (item.listBody8) { $w("#columnStrip64, #columnStrip65").expand(); $w("#columnStrip64, #columnStrip65").show('fade'); } else { $w("#columnStrip64, #columnStrip65").hide('fade').then(()=>{ $w("#columnStrip64, #columnStrip65").collapse(); }); } if (item.listBody8LinkText) { $w("#ListBody8Button").expand(); $w("#ListBody8Button").show('fade'); } else { $w("#ListBody8Button").hide('fade').then(()=>{ $w("#ListBody8Button").collapse(); }); } if (item.listBody8Image) { $w("#columnStrip66, #columnStrip67").expand(); $w("#columnStrip66, #columnStrip67").show('fade'); } else { $w("#columnStrip66, #columnStrip67").hide('fade').then(()=>{ $w("#columnStrip66, #columnStrip67").collapse(); }); } if (item.listBody8ImageCaption) { $w("#ListBody8ImageCaption").expand(); $w("#ListBody8ImageCaption").show('fade'); } else { $w("#ListBody8ImageCaption").hide('fade').then(()=>{ $w("#ListBody8ImageCaption").collapse(); }); } if (item.listBody9Title) { $w("#columnStrip68, #columnStrip69").expand(); $w("#columnStrip68, #columnStrip69").show('fade'); } else { $w("#columnStrip68, #columnStrip69").hide('fade').then(()=>{ $w("#columnStrip68, #columnStrip69").collapse(); }); } if (item.listBody9) { $w("#columnStrip70, #columnStrip71").expand(); $w("#columnStrip70, #columnStrip71").show('fade'); } else { $w("#columnStrip70, #columnStrip71").hide('fade').then(()=>{ $w("#columnStrip70, #columnStrip71").collapse(); }); } if (item.listBody9LinkText) { $w("#ListBody9Button").expand(); $w("#ListBody9Button").show('fade'); } else { $w("#ListBody9Button").hide('fade').then(()=>{ $w("#ListBody9Button").collapse(); }); } if (item.listBody9Image) { $w("#columnStrip72, #columnStrip73").expand(); $w("#columnStrip72, #columnStrip73").show('fade'); } else { $w("#columnStrip72, #columnStrip73").hide('fade').then(()=>{ $w("#columnStrip72, #columnStrip73").collapse(); }); } if (item.listBody9ImageCaption) { $w("#ListBody9ImageCaption").expand(); $w("#ListBody9ImageCaption").show('fade'); } else { $w("#ListBody9ImageCaption").hide('fade').then(()=>{ $w("#ListBody9ImageCaption").collapse(); }); } if (item.listBody10Title) { $w("#columnStrip74, #columnStrip75").expand(); $w("#columnStrip74, #columnStrip75").show('fade'); } else { $w("#columnStrip74, #columnStrip75").hide('fade').then(()=>{ $w("#columnStrip74, #columnStrip75").collapse(); }); } if (item.listBody10) { $w("#columnStrip76, #columnStrip77").expand(); $w("#columnStrip76, #columnStrip77").show('fade'); } else { $w("#columnStrip76, #columnStrip77").hide('fade').then(()=>{ $w("#columnStrip76, #columnStrip77").collapse(); }); } if (item.listBody10LinkText) { $w("#ListBody10Button").expand(); $w("#ListBody10Button").show('fade'); } else { $w("#ListBody10Button").hide('fade').then(()=>{ $w("#ListBody10Button").collapse(); }); } if (item.listBody10Image) { $w("#columnStrip78, #columnStrip79").expand(); $w("#columnStrip78, #columnStrip79").show('fade'); } else { $w("#columnStrip78, #columnStrip79").hide('fade').then(()=>{ $w("#columnStrip78, #columnStrip79").collapse(); }); } continues below in code part 4
if (item.body3LinkText) { $w("#body3Button").expand(); $w("#body3Button").show('fade'); } else { $w("#body3Button").hide('fade').then(()=>{ $w("#body3Button").collapse(); }); } if (item.excerpt) { $w("#ColumnStrip17, #BlankColumn8").expand(); $w("#ColumnStrip17, #BlankColumn8").show('fade'); } else { $w("#ColumnStrip17, #BlankColumn8").hide('fade').then(()=>{ $w("#ColumnStrip17, #BlankColumn8").collapse(); }); } if (item.subtitle4) { $w("#ColumnStrip19, #BlankColumn9").expand(); $w("#ColumnStrip19, #BlankColumn9").show('fade'); } else { $w("#ColumnStrip19, #BlankColumn9").hide('fade').then(()=>{ $w("#ColumnStrip19, #BlankColumn9").collapse(); }); } if (item.body4) { $w("#ColumnStrip21, #BlankColumn10").expand(); $w("#ColumnStrip21, #BlankColumn10").show('fade'); } else { $w("#ColumnStrip21, #BlankColumn10").hide('fade').then(()=>{ $w("#ColumnStrip21, #BlankColumn10").collapse(); }); } if (item.body4LinkText) { $w("#body4Button").expand(); $w("#body4Button").show(); } else { $w("#body4Button").hide('fade').then(()=>{ $w("#body4Button").collapse(); }); } if (item.bodyImage3) { $w("#ColumnStrip23, #BlankColumn11").expand(); $w("#ColumnStrip23, #BlankColumn11").show('fade'); } else { $w("#ColumnStrip23, #BlankColumn11").hide('fade').then(()=>{ $w("#ColumnStrip23, #BlankColumn11").collapse(); }); } if (item.bodyImage3Caption) { $w("#BodyImage3Caption").expand(); $w("#BodyImage3Caption").show('fade'); } else { $w("#BodyImage3Caption").hide('fade').then(()=>{ $w("#BodyImage3Caption").collapse(); }); } if (item.body5) { $w("#ColumnStrip2, #columnStrip24").expand(); $w("#ColumnStrip2, #columnStrip24").show('fade'); } else { $w("#ColumnStrip2, #columnStrip24").hide('fade').then(()=>{ $w("#ColumnStrip2, #columnStrip24").collapse(); }); } if (item.body5LinkText) { $w("#body5Button").expand(); $w("#body5Button").show('fade'); } else { $w("#body5Button").hide('fade').then(()=>{ $w("#body5Button").collapse(); }); } if (item.listBody1Title) { $w("#columnStrip22, #columnStrip23").expand(); $w("#columnStrip22, #columnStrip23").show('fade'); } else { $w("#columnStrip22, #columnStrip23").hide('fade').then(()=>{ $w("#columnStrip22, #columnStrip23").collapse(); }); } if (item.listBody1) { $w("#columnStrip19, #columnStrip20").expand(); $w("#columnStrip19, #columnStrip20").show('fade'); } else { $w("#columnStrip19, #columnStrip20").hide('fade').then(()=>{ $w("#columnStrip19, #columnStrip20").collapse(); }); } if (item.listBody1LinkText) { $w("#ListBody1Button").expand(); $w("#ListBody1Button").show('fade'); } else { $w("#ListBody1Button").hide('fade').then(()=>{ $w("#ListBody1Button").collapse(); }); } if (item.listBody1Image) { $w("#columnStrip21, #columnStrip25").expand(); $w("#columnStrip21, #columnStrip25").show('fade'); } else { $w("#columnStrip21, #columnStrip25").hide('fade').then(()=>{ $w("#columnStrip21, #columnStrip25").collapse(); }); } if (item.listBody1ImageCaption) { $w("#ListBody1ImageCaption").expand(); $w("#ListBody1ImageCaption").show('fade'); } else { $w("#ListBody1ImageCaption").hide('fade').then(()=>{ $w("#ListBody1ImageCaption").collapse(); }); } if (item.listBody2Title) { $w("#columnStrip26, #columnStrip27").expand(); $w("#columnStrip26, #columnStrip27").show('fade'); } else { $w("#columnStrip26, #columnStrip27").hide('fade').then(()=>{ $w("#columnStrip26, #columnStrip27").collapse(); }); } if (item.listBody2) { $w("#columnStrip28, #columnStrip29").expand(); $w("#columnStrip28, #columnStrip29").show('fade'); } else { $w("#columnStrip28, #columnStrip29").hide('fade').then(()=>{ $w("#columnStrip28, #columnStrip29").collapse(); }); } if (item.listBody2LinkText) { $w("#ListBody2Button").expand(); $w("#ListBody2Button").show('fade'); } else { $w("#ListBody2Button").hide('fade').then(()=>{ $w("#ListBody2Button").collapse(); }); } if (item.listBody2Image) { $w("#columnStrip30, #columnStrip31").expand(); $w("#columnStrip30, #columnStrip31").show('fade'); } else { $w("#columnStrip30, #columnStrip31").hide('fade').then(()=>{ $w("#columnStrip30, #columnStrip31").collapse(); }); } if (item.listBody2ImageCaption) { $w("#ListBody2ImageCaption").expand(); $w("#ListBody2ImageCaption").show('fade'); } else { $w("#ListBody2ImageCaption").hide('fade').then(()=>{ $w("#ListBody2ImageCaption").collapse(); }); } if (item.listBody3Title) { $w("#columnStrip32, #columnStrip33").expand(); $w("#columnStrip32, #columnStrip33").show('fade'); } else { $w("#columnStrip32, #columnStrip33").hide('fade').then(()=>{ $w("#columnStrip32, #columnStrip33").collapse(); }); } continues below in code part 3
Here is my updated code:
import wixWindow from 'wix-window'; //When page is ---> READY ...... $w.onReady(function () { $w('#columnStrip18').hide(); //---> hides a STRIP $w('#columnStrip7').show(); //---> shows a STRIP $w("#BodyImage3").fitMode = "fixedWidth"; $w("#SoloImage").fitMode = "fixedWidth"; //When dataset is ready...... $w("#dynamicDataset").onReady(() => { let item = $w("#dynamicDataset").getCurrentItem(); //---> gets current item of dynamic-dataset // MOBILE-VERSION runs here ...... if(wixWindow.formFactor === "Mobile"){ $w("#line11").expand(); $w("#text88").expand(); $w("#box46").expand(); } else{ $w("#line11").collapse(); $w("#text88").collapse(); $w("#box46").collapse(); } if (item.body1) { $w("#columnStrip173, #Body1, #BlankColumn2").expand(); $w("#columnStrip173, #Body1, #BlankColumn2").show('fade'); } else { $w("#Body1, #columnStrip173, #BlankColumn2").hide('fade').then(()=>{ $w("#Body1, #columnStrip173, #BlankColumn2").collapse(); }); } if (item.blog1LinkText) { $w("#body1Button, #columnStrip174").expand(); $w("#body1Button, #columnStrip174").show('fade'); } else { $w("#columnStrip174, #body1Button").hide('fade').then(()=>{ $w("#columnStrip174, #body1Button").collapse(); }); } if (item.subtitle) { $w("#ListStrip, #columnStrip176").expand() $w("#ListStrip, #columnStrip176").show('fade'); } else { $w("#ListStrip, #columnStrip176").hide('fade').then(()=>{ $w("#ListStrip, #columnStrip176").collapse(); }); } if (item.bodyImage1) { $w("#BodyImage1").expand(); $w("#BodyImage1").show('fade'); } else { $w("#BodyImage1").hide('fade').then(()=>{ $w("#BodyImage1").collapse(); }); } if (item.bodyImage2) { $w("#BodyImage2, #columnStrip8, #columnStrip4").expand(); $w("#BodyImage2, #columnStrip8, #columnStrip4").show('fade'); } else { $w("#BodyImage2, #columnStrip8, #columnStrip4").hide('fade').then(()=>{ $w("#BodyImage2, #columnStrip8, #columnStrip4").collapse(); }); } if (item.soloImage) { $w("#SoloImage, #BlankColumn3, #columnStrip9").expand(); $w("#SoloImage, #BlankColumn3, #columnStrip9").show('fade'); } else { $w("#SoloImage, #BlankColumn3, #columnStrip9").hide('fade').then(()=>{ $w("#SoloImage, #BlankColumn3, #columnStrip9").collapse(); }); } if (item.bodyImage1Caption) { $w("#BodyImage1Caption").expand(); $w("#BodyImage1Caption").show('fade'); } else { $w("#BodyImage1Caption").hide('fade').then(()=>{ $w("#BodyImage1Caption").collapse(); }); } if (item.bodyImage2Caption) { $w("#BodyImage2Caption").expand(); $w("#BodyImage2Caption").show('fade'); } else { $w("#BodyImage2Caption").hide('fade').then(()=>{ $w("#BodyImage2Caption").collapse(); }); } if (item.soloImageCaption) { $w("#SoloImageCaption").expand(); $w("#SoloImageCaption").show('fade'); } else { $w("#SoloImageCaption").hide('fade').then(()=>{ $w("#SoloImageCaption").collapse(); }); } if (item.subtitle2) { $w("#ColumnStrip9, #BlankColumn4").expand(); $w("#ColumnStrip9, #BlankColumn4").show('fade'); } else { $w("#ColumnStrip9, #BlankColumn4").hide('fade').then(()=>{ $w("#ColumnStrip9, #BlankColumn4").collapse(); }); } if (item.body2) { $w("#ColumnStrip11, #BlankColumn5").expand(); $w("#ColumnStrip11, #BlankColumn5").show('fade'); } else { $w("#ColumnStrip11, #BlankColumn5").hide('fade').then(()=>{ $w("#ColumnStrip11, #BlankColumn5").collapse(); }); } if (item.blog2LinkText) { $w("#body2Button").expand(); $w("#body2Button").show('fade'); } else { $w("#body2Button").hide('fade').then(()=>{ $w("#body2Button").collapse(); }); } if (item.subtitle3) { $w("#ColumnStrip13, #BlankColumn6").expand(); $w("#ColumnStrip13, #BlankColumn6").show('fade'); } else { $w("#ColumnStrip13, #BlankColumn6").hide('fade').then(()=>{ $w("#ColumnStrip13, #BlankColumn6").collapse(); }); } if (item.body3) { $w("#ColumnStrip15, #BlankColumn7").expand(); $w("#ColumnStrip15, #BlankColumn7").show('fade'); } else { $w("#ColumnStrip15, #BlankColumn7").hide('fade').then(()=>{ $w("#ColumnStrip15, #BlankColumn7").collapse(); }); } ...continues in code Part 2 below.
Upon reading your live site, it can be simplified.
For example:
$w("#dynamicDataset").onReady(() => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBodySummaryTitle) { $w("#columnStrip170").show(); $w("#columnStrip171").show(); } else { $w("#columnStrip170").collapse(); $w("#columnStrip170").hide(); $w("#columnStrip171").collapse(); $w("#columnStrip171").hide(); } }); $w("#dynamicDataset").onReady(() => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBodySummary) { $w("#columnStrip172").show(); $w("#BlankColumn12").show(); } else { $w("#columnStrip172").collapse(); $w("#columnStrip172").hide(); $w("#BlankColumn12").collapse(); $w("#BlankColumn12").hide(); } });
To
$w("#dynamicDataset").onReady(() => { let item = $w("#dynamicDataset").getCurrentItem(); if (item.listBodySummaryTitle) { $w("#columnStrip170, #columnStrip171").show(); $w("#columnStrip171").show(); } else { $w("#columnStrip170, #columnStrip171").collapse(); $w("#columnStrip170, #columnStrip171").hide(); } if (item.listBodySummary) { $w("#columnStrip172, #BlankColumn12").show(); } else { $w("#columnStrip172, #BlankColumn12").collapse(); $w("#BlankColumn12, #columnStrip172").hide(); } });
Also, the element ID should be changed to a read-able ID like
listBodySummaryTitleStrip
Hope this helps :)