Is there a way to perform javascript operations immediately after a renderUI?

I am re-rendering a UI with renderUI. However, I need to attach some jquery plugins on the resulting HTML immediately after it has been attached.

is there a way to perform javascript operations immediately after the HTML has been attached to the DOM, without relying on monitoring the DOM itself for changes?

The shinyjs package should be helpful here. See this SO thread for an example that seems similar to what you are trying to achieve.

shinyjs to me seems more like a collection of additional handlers. You can only trigger them procedurally, but the point is that there's nothing to apply them on, if the html hasn't been attached to the DOM. This happens only after the renderUI returns the chunk, which is then delivered client side, and only then the javascript can be executed. However, the renderUI call is now over. How can you trigger a javascript event after that?

Maybe this is useful.

Also related:

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.