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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:46:36+00:00 2026-06-15T03:46:36+00:00

I am using jQuery 1.8.3 and jQuery UI 1.9.2. My web application has got

  • 0

I am using jQuery 1.8.3 and jQuery UI 1.9.2.
My web application has got some draggable elements and I would like to allow the user to select some text in the contained elements.
I’ve seen there are some other questions on this topic.
Another path I am following is use the right-click of the mouse and use some text-selection plug-in I have found.
Still I can’t make it work.

It seems that draggable/sortable elements don’t allow text selection or can intercept mouse (clicks) events.

Any ideas?

  • 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-15T03:46:38+00:00Added an answer on June 15, 2026 at 3:46 am

    I believe your approach is correct and that you can use right-click to copy the text from certain divs.

    E.g. with:

    <script src="http://cachedcommons.org/cache/zero-clipboard/1.0.7/javascripts/zero-clipboard-min.js" type="text/javascript"></script>
    <div id="dragme" class="temp">Draggable Text</div>
    

    as well as including jquery-ui, the following JavaScript should allow you to use left-click to drag and drop a div, and right-click to copy the text within the div:

    $("#dragme").draggable();
    
    $.event.special.rightclick = {
        bindType: "contextmenu",
        delegateType: "contextmenu"
    };
    
    ZeroClipboard.setMoviePath('http://zeroclipboard.googlecode.com/svn/trunk/ZeroClipboard10.swf');
    //Create a new clipboard client
    var clip = new ZeroClipboard.Client();
    
    $(document).on("rightclick", ".ui-draggable", function() {
    
            //Grab the text from the parent row of the icon
            var txt = $(this).text();
            alert("Copying text: "+txt);
            clip.setText(txt);
            clip.glue(this);
    
            //Add a complete event to let the user know the text was copied
            clip.addEventListener('complete', function(client, text) {
                alert("Copied text to clipboard:\n" + text);
            });
            clip.hide();
            return false;
    });
    

    I have a jsfiddle for this but I think the SWF copy with ZeroClipboard doesn’t agree with jsfiddle.
    But it should work in your development environment.

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

Sidebar

Related Questions

I will be using jQuery's functionality to create portlet widgets for my web application
I'm using jQuery's Themeroller to create a style for my web application. I am
I have a web application that is using both jQuery 1.2.6 and YUI 2.6.0
I'm working on a web application and using the jQuery plug-in Colorbox to pop
I need to create a web application using ASP.NET MVC, jQuery and web standards
I'm working on a web application, and I am using the JQuery UI Tabs
We are constructing a mobile web application using PhoneGap and JQuery mobile. Here is
I'm developing a web application using ASP .NET MVC 1.0 and jQuery (including the
I am building a AJAX intensive web application (using ASP.NET, JQuery, and WCF web
I'm working on a web application that has some api calls that send arguments

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.