I have a jquery code that I have to trigger after the page is loaded, I am doing it in postRender function call of the view, but postRender and window load event are totally async, so, the window load event might happen before I am in postRender adding the listener for the load event, is there any replacement for the function in this case, or am I missing something?
thanks for the help
You could use a flag to keep track of the
window.load
event in the global scope and choose an execution path inpostRender()
based on the status of the flag.Then in
view.postRender()
: