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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:00:20+00:00 2026-05-20T18:00:20+00:00

Hi I’m doing a self-project on creating a jQuery UI to allow users to

  • 0

Hi I’m doing a self-project on creating a jQuery UI to allow users to drag-n-drop links/webpages, specifically, articles from Wikipedia, to a sort of ‘organizer’ like the stacks in Solitaire. I’m hoping to add various features such as when the user drag-n-drops the Wikipage to the UI such as grouping items/card visuals.

I’m unsure where to start as I’m relatively new to jQuery. Is it possible to drag a page from Wikipedia and drop it in a jQuery UI? If anyone has any advice, that would be awesome as I’m really trying to figure out how to kick this thing off the ground.


Edit: Anyone? I’ve had no luck finding anything yet.

  • 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-20T18:00:21+00:00Added an answer on May 20, 2026 at 6:00 pm

    EDIT 2:

    I rewrote this in pure JS form (also fixes some issues).

    Gist: https://gist.github.com/matt-curtis/9044134

    JSFiddle: http://jsfiddle.net/z9Y86/1/

    Code:

    var LinkGrabber = {
        textarea: null,
    
        /* Textarea Management */
    
        attach_ta: function(){
            if(LinkGrabber.textarea != null) return;
    
            var textarea = LinkGrabber.textarea = document.createElement("textarea");
            textarea.setAttribute("style", "position: fixed; width: 100%; margin: 0; top: 0; bottom: 0; right: 0; left: 0; z-index: 99999999");
            textarea.style.opacity = "0.000000000000000001";
    
            var body = document.getElementsByTagName("body")[0];
            body.appendChild(textarea);
    
            textarea.oninput = LinkGrabber.evt_got_link;
        },
    
        detach_ta: function(){
            if(LinkGrabber.textarea == null) return;
            var textarea = LinkGrabber.textarea;
    
            textarea.parentNode.removeChild(textarea);
            LinkGrabber.textarea = null;
        },
    
        /* Event Handlers */
    
        evt_drag_over: function(){
            LinkGrabber.attach_ta(); //Create TA overlay
        },
    
        evt_got_link: function(){
            /* THIS IS WHERE WE HANDLE THE RECEIVED LINK */
    
            var link = LinkGrabber.textarea.value;
    
            alert(link);
    
            LinkGrabber.detach_ta();
        },
    
        evt_drag_out: function(e){
            if(e.target == LinkGrabber.textarea) LinkGrabber.detach_ta();
        },
    
        /* Start/Stop */
    
        start: function(){
            document.addEventListener("dragover", LinkGrabber.evt_drag_over, false);
            document.addEventListener("dragenter", LinkGrabber.evt_drag_over, false);
    
            document.addEventListener("mouseup", LinkGrabber.evt_drag_out, false);
            document.addEventListener("dragleave", LinkGrabber.evt_drag_out, false);
        },
    
        stop: function(){
            document.removeEventListener("dragover", LinkGrabber.evt_drag_over);
            document.removeEventListener("dragenter", LinkGrabber.evt_drag_over);
    
            document.removeEventListener("mouseup", LinkGrabber.evt_drag_out);
            document.removeEventListener("dragleave", LinkGrabber.evt_drag_out);
    
            LinkGrabber.detach_ta();
        }
    };
    

    Original Answer:

    The only POSSIBLE solution I can think of is to do something that uses
    an input or textarea to get the link of the dropped anchor, because
    inputs and textarea(s) receive the links of dropped links as text.

    HTML:

    <textarea id="link_grabber"></textarea>
    <div id="notice">Drop a link on me! :)</div>
    

    JS:

    $("body").bind("dragenter dragover", function(){
        //When the user has dragged a link into the document...
    }).bind("dragleave dragexit", function(){
        //When the drag is moved outside the document...
    });
    
    setInterval(function(){
        if($("#link_grabber").val() != ""){
            var val = $("#link_grabber").val(); //Get the newly dropped link
            $("#link_grabber").val(""); //prep textarea for the next link
            $("#notice > span").text("Your link is: "+val);
        }
    }, 100);​
    

    I made a jsFiddle that demonstrates the concept:
    http://jsfiddle.net/C8yAa/2/

    EDIT: There is also an HTML5 way of doing this, check this out: http://www.html5rocks.com/en/tutorials/dnd/basics/

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Specifically, suppose I start with the string string =hello \'i am \' me And
I am reading a book about Javascript and jQuery and using one of the
I am doing a simple coin flipping experiment for class that involves flipping a
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is

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.