Modifying dynamic data generated using App Connect, with jQuery

I have an item detail page which displays data from a database table based on an id passed as an URL parameter. I would like to apply a class to specific words using jQuery. If the text is static, the class is applied as I want; if the page is dynamic, nothing happens. I imagine it might be some sort of timing/loading issues.

It’s probably a general jQuery/Wappler question, but does something need to be done to make sure the data generated with App Connect has loaded before the jQuery function starts?

You need to wrap your jQuery code within a named function and call it later using the static events option - onupdated event.

So it goes like:

function myFunction() {
code here
}

And then you call myFunction() with onupdated static event of server connect component :slight_smile:
Then it will be loaded after the data has been loaded.

1 Like

thats a pretty interesting topic! Would love to see a that sample :ok_hand:t5:

Thanks Teodor - that solved it . Unfortunately it’s only the first part of getting something to work, but that’s very helpful.

1 Like