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 6242623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:59:19+00:00 2026-05-24T11:59:19+00:00

$(‘#ajax-links a’).live(‘click’, function(e) { var url = $(this).attr(‘href’); url = url.replace(/^.*#/, ”); $.history.load(url); return

  • 0
$('#ajax-links a').live('click', function(e) {
    var url = $(this).attr('href');
    url = url.replace(/^.*#/, '');
    $.history.load(url);
    return false;
});

Whenever I replace ‘click’ with ‘dblclick’ it still behaves as the click event. The demo is here (http://www.serpere.info/jquery-history-plugin/samples/ajax/) and the source can be download from here : https://github.com/tkyk/jquery-history-plugin/tree/master/samples/

  • 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-05-24T11:59:20+00:00Added an answer on May 24, 2026 at 11:59 am

    Try prevent default on single click when adding dblclick:

    Instead of return false; you can prevent the default action for the event:

    If you don’t want the event to bubble throw the DOM you can use the event.stopPropagation() function

    $('#ajax-links a').live('click', function(event) {
        event.preventDefault();
    });
    $('#ajax-links a').live('dblclick', function(event) {
        event.preventDefault();
        var url = $(this).attr('href');
        url = url.replace(/^.*#/, '');
        $.history.load(url);
    });
    

    Dblclick events only gets fired at dblclick: see: jsfiddle.net/cR5ZS

    The reason you think its get fired on single click can be that your link refers to something like: #/some_page/ and your dblclick event handler does almost the same. Saves /some_page/ with $.history plugin and in my experience the $.history plugin does almost the same: takes the url parsed to with the call and puts it in the hash : url=/some_page/ becomes #/some_page/

    Andreas

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

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
I've got a string that has curly quotes in it. I'd like to replace
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Hi if i run my project its indicate this logcat error...how to solve this
I need a function that will clean a strings' special characters. I do NOT
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from
I am trying to create a RegEx expression that will successfully parse 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.