Crocoblock / suggestions

The suggestions for CrocoBlock project
191 stars 78 forks source link

Add dynamic visibility based on DOM #7528

Closed tudorachedesign closed 1 month ago

tudorachedesign commented 1 month ago

Hi,

Sometimes it's necessary to show or hide some elements based on some elements in the DOM.

For example if I have 3 elements and I want to show each element based on an attribute in a specific class/ID it must be done with JS and place an observer on those elements, so it can see if the DOM changes and then place the conditions of visibility on those elements.

It would be nice to have this options on Dynamic visibility widget from Jetengine.

It should work like this: Show element if #id contains "attribute" or Hide element if #id contains "attribute"...

Don't know if it's clear

MjHead commented 1 month ago

I recommend use some custom code for this as for now. Dynamic visibility module do all checks on the back end. Adding front-end check will require to much changes in module logic. So if we'll add such functionality in future most probable it will be implemented as separate addon