Hi,
I watched a video from @md60th in another post and it helps me understand few things but I’m still struggling to have a simple function to expand the video when in dataset .
No play button or anything, just the video shown or hidden, and link to dataset…
(Here is the other post from @russelljhunte : https://www.editorxcommunity.com/forum/general-discussions/hide-show-elements-based-on-data-in-dataset)
I tried a similar approach as we I already did with images and paragraphs as you can see below:
But it doesn’t seem to work with videos…
exportfunction dynamicDataset_ready (){
const pageData = $w ( ’ #dynamicDataset ’ ). getCurrentItem ();
console . log ( pageData )
if ( ‘paragraph01’ in pageData ){
$w ( ’ #paragraph01 ’ ). expand ();
}
if ( ‘videoBox3’ in pageData ){
$w ( ’ #videoBox3 ’ ). expand ();
}
If someone could help me it would be awesome!
Thank you all