I need to bind event on window object inside backbone view and when navigated to other backbone view i want to unbind window event. Is there any efficient way to do this in the backbone??
example:
class Example.Views.EntriesList extends Backbone.View
initialize: ->
$(window).unbind('scroll').on 'scroll', _.bind(@scroll, this)
Above code works perfect for this view but when navigated to different backbone view then scroll bind is still present. I wanted to remove all the events binded to window when view changes.