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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:44:19+00:00 2026-06-11T11:44:19+00:00

I want to develop a javascript drag and drop application just like the one

  • 0

I want to develop a javascript drag and drop application just like the one you can see here , where you can pick and object and drag it to another area. But i want to do this with a twist. I want to be able do drag the same object multiple time, instead of moving the object from the book shelf to the basket, i want to drag one instance of the object to the book shelf and still have the object on the book shelf.

It’s like buying multiple instances of the same object, each time i drag the object from the book shelf to the basket, i add another instance of the object to the basket.

Any ideas on how can i achieve this effect?

  • 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-11T11:44:20+00:00Added an answer on June 11, 2026 at 11:44 am

    You do the same thing as with regular drag and drop but instead of removing the dragged object, you clone it.

    Implementing drag and drop is kind of tricky, a library like jQuery could really save you a lot of time and effort. jQuery UI’s draggable has a helper: clone option which leaves the dragged object in place, cloning it instead. Then when defining your drop area using jQuery UI Droppable you can do whatever you want with the dropped element, like creating a new element representing the basket item, leaving the dragged item untouched. So if using jQuery is an option, that wouldn’t be difficult to do at all.

    UPDATE: HERE’S A QUICK DEMO

    HTML

    <div id="list">
        <div class="productItem">product 1</div>
        <div class="productItem">product 2</div>
        <div class="productItem">product 3</div>
    </div>
    
    <div id="basket">
    </div>​
    

    JS

    $(".productItem").draggable({
        helper: 'clone',
        handle: "productItem"
    });
    
    $("#basket").droppable({
        accept: ".productItem",
        drop: function(event, ui){
            $("<div></div>")
                .html(ui.draggable.text())
                .appendTo($(this));
        }
    });
    

    ​

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

Sidebar

Related Questions

I want develop some web product with using javascript 3d library like three.js But
Want to develop a query refinement tool just like Google Suggest so that i
I want to develop a program in c# that can target and application or
I want to develop app which will recognize object(like monument or something) present in
I want to develop an application with simple Quiz-like games (think of a question
I want to develop an application for WP7 using HTML,CSS and Javascript something Similar
I want to develop a website where people can find useful informations about other
I want to develop an app which can Block the Invocation of some Blackberry
I Want to develop a app which can identify corporate email accounts and when
I am using phonegap to develop my android application.I want to show google chart

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.