0
votes

Marionette js has a "onDomRefresh" event which can be used after the view has been rendered. I'm looking for something in Backbone which can be used as a alternative to "onDomRefresh" since I don't use marionette.

1
What are you actually trying to achieve?T J
I want to implement a jQuery slider on the backbone view. So need to initialize it right after the view is rendered.Sanjay Rawat
Are you not in control of the view rendering? Can you change the render() to include your slider initialization?T J
I had included the slider initialization in the render, but it doesn't works the first time the view is rendered. But works on subsequent renders.Sanjay Rawat

1 Answers

0
votes

You could use jquery/javascript function to bind your to function to document/window before unload event

$(window).on('beforeunload', function(){
      //any;
});