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

  • SEARCH
  • Home
  • 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 7864225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:43:09+00:00 2026-06-02T23:43:09+00:00

Router in Backbone.js is responsible for routing client-side pages, and connecting them to actions

  • 0

Router in Backbone.js is responsible for routing client-side pages, and connecting them to actions and events based on urls. But how to trigger the url change? I mean if the only way to do this is to enclose the element associated with page routing in <a> tag.

Because I have associated the mousedown and mouseup events with the element used for routing, if I put it in <a> tag, the mousedown and mouseup events will definitely become invalid as it will have conflict with the click event of <a> tag. So is there other ways to make the routing?

  • 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-02T23:43:10+00:00Added an answer on June 2, 2026 at 11:43 pm

    You can use Router#navigate:

    navigate router.navigate(fragment, [options])

    Whenever you reach a point in your application that you’d like to save as a URL, call navigate in order to update the URL. If you wish to also call the route function, set the trigger option to true.

    So, if your router is r and you want to activate the route for #/some_route, then you could:

    r.navigate('some_route', { trigger: true });
    

    Demo (open your console please): http://jsfiddle.net/ambiguous/xkZtB/

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

Sidebar

Related Questions

Does in Backbone.Router exists the events both before and after performing routing? My app
Have done some working samples using Backbone Router, but is there a way to
I'm working on a Javascript Router like Backbone, Sammy, Spin. But my requirements are
I am using Backbone's router with pushState:true to handle my site's urls. Examples of
How do I set up a Backbone router that can handle URLs such as:
I have a constructor function, for example webapp.core.cf1 or Backbone.Router. But I get this
I have a Backbone Router: class X.Routers.Main extends Backbone.Router routes: '/': 'home' 'pageb': 'actionb'
When I use the Router in Backbone.js, IE6 throw a Permission Denied on the
Say I have the following Backbone Router: class App.Routers.ThingsRouter extends Backbone.Router initialize: -> new
Backbone.js provides a navigate(fragment, [options]) method for its Backbone.router objects, which does the following

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.