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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:59:25+00:00 2026-05-29T10:59:25+00:00

I am creating a web-app and selection of elements or text of any sort

  • 0

I am creating a web-app and selection of elements or text of any sort is unnecessary and doesn’t look nice.

I would like to stop any sort of selection initiated by mouse click and dragging of images except in one single div where I want the text to be selectable, however this is not a must since I will put a button to copy it to the clipboard.

How can I achieve this without crippling input boxes?

I tried many solutions but none is overall preventing this on the page entirety without breaking input boxes.

Thank you.

  • 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-29T10:59:26+00:00Added an answer on May 29, 2026 at 10:59 am

    If you already have jQuery UI enabled, you could simply chain .disableSelection() Otherwise, use this nice plugin i copycat’d from here How to disable text selection using jQuery?

    (function($){
    
    $.fn.disableSelection = function() {
        return this.each(function() {           
            $(this).attr('unselectable', 'on')
                   .css({
                       '-ms-user-select':'none'
                       '-moz-user-select':'none',
                       '-webkit-user-select':'none',
                       'user-select':'none',
                   })
                   .each(function() {
                       this.onselectstart = function() { return false; };
                   });
        });
    };
    
    })(jQuery);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a web app using Spring 3 and would like to harness the
I'm creating a web app (locally, so security doesn't matter) in PHP where the
I am creating a web app, similar to the like box code from Facebook:
I am creating a web app that requires me to render new elements on
I am creating a web app that requires a live notification system. How would
I'm creating a web app with jQuery Mobile. My map doesn't show the way
I am creating a web app that uses the Google Maps API to display
i'm creating a web app that's running on an Advantage Database server, not my
I'm creating a web app with Django. Since I'm very familiar with Apache I
I am creating a web app which uses jQuery to authenticate: $.ajax({ url: /session/create?format=json,

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.