My problem is:
All the HTML is in a <div id="application"> container, which by default has 0 opacity. This is because JavaScript does some DOM positioning, so when this is all done I just add a class="rendered" into the <div id="application>" and then the page appears.
So the thing is, for every route in my Backbone router, I need something that is always triggered before the actual routing, or on each route, is this possible?
Thanks for help!
Backbone.Routeremits events when a route triggers, so you can either bindto specific events or to
allto capture all valid route changes. The eventargument will contain the route callback name:
I feel like this sort of code would be better off in a view, but this ought to
do what you ask for.