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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:55:29+00:00 2026-06-06T04:55:29+00:00

for the moment the script does like this: click on the link edit the

  • 0

for the moment the script does like this:

  1. click on the link edit the link by making the input visible
  2. click next/before the link edit the link by making the input visible

i want when you click one time on the link not to edit but to open the page in new window, and when you click double to edit.

here’s the script:

jsfiddle – CODE

  • 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-06T04:55:31+00:00Added an answer on June 6, 2026 at 4:55 am

    http://jsfiddle.net/jaspermogg/pFyNY/1/ – you can double click the div to edit, or single click the link to open. That what you wanted?

    $('.a0').dblclick(function(e){
        e.preventDefault();
        $(this).parent().find('input').val($(this).find('a').text()).show().focus();
        $(this).hide();
    })
    
    $('#url0, #url1').each(
        function(index, element){
            $(element).blur(function(){
                $(this).hide().prev().show().find('a').html(this.value);
        })
        }    
    );
    

    And here’s a jsFiddle that changes the href of the a to the value you edited it to, just in case that’s what you’re trying to do next 🙂 http://jsfiddle.net/jaspermogg/pFyNY/2/

    Here’s the jsFiddle that does what you want – http://jsfiddle.net/jaspermogg/pFyNY/5/

    JS –

    $('.a0 a').click(function(){
    
        var href = $(this).attr('href');
    
        // Redirect only after 500 milliseconds (CHANGE THE 500 IN THE CODE TO DETERMINE HOW LONG THE USER GETS TO DBLCLICK)
        if (!$(this).data('timer')) {
           $(this).data('timer', setTimeout(function () {
              window.location = href;
           }, 500));
        }
        return false; // Prevent default action (redirecting)
    });
    
    $('.a0').dblclick(function(){
        clearTimeout($(this).find('a').data('timer'));
        $(this).find('a').data('timer', null);
    
        $(this).parent().find('input').val($(this).find('a').text()).show().focus();
        $(this).hide();
    })
    
    $('#url0, #url1').each(
        function(index, element){
            $(element).blur(function(){
                $(this).hide().prev().show().find('a').html(this.value);
        })
        }    
    );
    

    Inspired by Jquery create Double Click event on A Href

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

Sidebar

Related Questions

I have this script at the moment, which changes an image when a thumbnail
At the moment I'm building a login Script on powershell basis. This login script
I'd like to write a shell script that does something like the following while
I'm not sure if this is possible but I want to use mod_rewrite like
The script is on jsfiddle here : CODE What it does at the moment
At the moment I have a very simple script. If I type the commands
I create a custom import and export, at the moment as an external script
At moment I want to implement picture upload without using any plug-ins. My upload
Till this moment I used this method to invoke: public string AddText { set
Im having a moment, what i want to do is really simple and i

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.