New Button - Find Class and add/remove Class - Mendix Forum

New Button - Find Class and add/remove Class


Often times you would like to minipulate the DOM by adding or removing classes.

This can be done with nano flows and creating objects, but this is tedious and messy.

you can also do this by writing a nanoflow that calls a JS, also messy.

You can also use the HTML widget to do this, also messy.

I would love to see a button/link that can target the nearest container with a class and add remove a class.


creating a side bar that can slide in or out
create a button in your navigation.
target .js_sidebar.closed and remove .closed and add .open

having more search options.
have a button with show more search options.
target .js_searchoptions.closed and remove .close and add .open.

creating a nested navigation structure.
click on a top level item.
for THIS item, remove .closed and add .open.

doing it this way, you can have items that have the flexibility of groupboxes without the trigger being part of the groupbox, which would enable interfaces to be more dynamic and inline with what competitors are doing.

0 answers