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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:50:05+00:00 2026-05-27T23:50:05+00:00

How can I make a link selectable, like normal text, without triggering the mouse

  • 0

How can I make a link selectable, like normal text, without triggering the mouse click?

Unlinked text can be easily selected from the middle. I want to make the link selectable if the user holds down the mouse, but if it’s a single click then open the link as normal.

  • 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-27T23:50:06+00:00Added an answer on May 27, 2026 at 11:50 pm

    This behaviour is defined by the browser so there’s not much you can do about it. I believe some browsers do allow you to select anchor text from any point (Opera?), not just the start and end, but that’s not much use to you.

    If you really want to change the default browser behaviour (which is rarely a good idea), then read on…

    One potential solution could be to not use a elements, but instead use something like span. Give each span link a common class and store the intended URL:

    <span class="linkSpan" data-link="http://www.example.com">This is a link</span>
    

    Then use JavaScript (you’ve tagged the question with jQuery so I’ll use jQuery here) to redirect the user:

    $(".linkSpan").click(function() {
        window.location = $(this).data("link");
    });
    

    Obviously you would need to style .linkSpan appropriately to make it appear more like an actual link.

    Update (following @Madmartigan’s comment) – if you hold the mouse button down when the cursor is not over the link, then move over the link itself, you can start selecting text from any point within the link. I managed that in Chrome at least.

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

Sidebar

Related Questions

How can I make the selected link from the List below, bold, that you
How can I make this link use the child selector without changing or removing
How can I make a link to my Flash file? Like an image, I
I have code <div class=row1> <em>My text</em> </div> How can I make a link
How can make a link within a facebox window that redirects it to another
ModelMultipleChoiceField doesn't select initial choices and I can't make the following fix (link below)
I have a link_to_remote and I want to make sure people can only click
How can I make a link that justs adds or changes 1 GET var
I want to make my gridview rows selectable. I don't like the idea of
I have a script which can make each table row clickable (as a link),

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.