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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:43:48+00:00 2026-05-31T04:43:48+00:00

When you double click on a word in all browsers, they automatically highlight the

  • 0

When you double click on a word in all browsers, they automatically highlight the word under the click. But is it possible to find a way to have the exact same thing happen on a single click?

I imagine things involved in this might be:
– TextRange stuff;
– Reacting to onclick for all paragraphs (or whole body or div), … but then I have not found anywhere that says how you could tell the browser:

“Hey! Please do that cool thing of highlighting text right under the mouse … RIGHT NOW … even though I only single clicked, not double clicked.”

Just for clarification: I am not asking to highlight the whole text within a div or paragraph (that would be fairly simple, many explanations are given for that on stackoverflow). Nor am I wanting to do anything like insert a billion spans for each word. I am hoping to find the exact same functionality you get when a double click on text occurs in a browser, but for a single click.

Yes, I plan to do something with the selected text then.

  • 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-31T04:43:50+00:00Added an answer on May 31, 2026 at 4:43 am
    $('#content').click(function() {
        $(this).dblclick();
    });
    

    The browser may restrict this behavior. For instance, if you attempted to .click() a different element by diverting or performed another event. The following answer may also help there:

    Javascript with jQuery: Click and double click on same element, different effect, one disables the other

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

Sidebar

Related Questions

In Notepad++ if you double click a word to highlight it, all the occurrences
When you double-click on a Word document, Word is automatically run and the document
I know about cmd-double-click , and use it all the time, it's great. But
When double-clicking on a html page most browsers select the word you double-click on
Almost any mature program that involves text implements double click to select the word
It was possible to double click the websphere server connector in server tab in
I want to double click on a div, but right now it selects/highlights a
When I double click a row it is selecting the row in IE8 but
In MS-Word Mouse Click events are used as: Single Click - placing Cursor Double
If I double-click on a word inside my NSTextField, it selects the entire word,

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.