Hi Narendran,
Looks like your snippet is tries to find stuff that is not rendered yet, Add a timeout to validate that.
What about using a widget for this. for example
https://appstore.home.mendix.com/link/app/108838/
There are various widgets that can set style and classes.
Please be casefull setting classes on items that are conditional visible, they classes will be gone after hide and show.
Cheers, Andries
You could make use of one of the client api’s to trigger your code once the dom is completely rendered, and all data is loaded. it’s an event listener.
mx.addOnLoad(function() {
myFunction();
});
function myFunction(){
console.log("Do something");
}
documentation can be found here
Hi Narendran j,
First, you need to store the jquery library inside the HTML snippet and after that, u need to add another JavaScript snippet inside it u have to write the code to avoid rendering stuff because it searches for the library.
Regards,
Yasar