Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8643841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:09:02+00:00 2026-06-12T12:09:02+00:00

My problem is: All the HTML is in a <div id=application> container, which by

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:09:04+00:00Added an answer on June 12, 2026 at 12:09 pm

    Backbone.Router emits events when a route triggers, so you can either bind
    to specific events or to all to capture all valid route changes. The event
    argument will contain the route callback name:

    var MyRouter = Backbone.Router.extend({
        routes: {
            "foo": "bar"
        },
    
        initialize: function() {
            this.on('all', function(routeEvent) {
                // If you had clicked #foo, routeEvent would contain
                // `route:bar`. You can trigger your CSS changes here.
            });
        }
    });
    

    I feel like this sort of code would be better off in a view, but this ought to
    do what you ask for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi all I have problem with my div's in html. I have set them
Problem Hello all! I have this code which takes my jpg image loops through
The web designer has given me HTML which looks like: <div .... style=background: transparent
Some background: I'm developing a web based mobile application using JavaScript. HTML rendering is
I periodically get this problem where all of a sudden mako is using old
im making some script with mechanize.browser module. one of problem is all other thing
I'm writing a JavaScript chatting application, but I'm running into a minor problem. Here
I was working on an intranet application which has been working on quirks mode
i'm having this problem: Suppose you've a blog application and you want to display
I am developing a wysiwyg page using javascript (no libraries) and because it has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.