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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:29:34+00:00 2026-05-16T04:29:34+00:00

I am trying to create a stage. I have 5 items in a draggable

  • 0

I am trying to create a stage.
I have 5 items in a draggable div. There clones will be dragged to 20 droppable areas.

I have created 20 boxes of divs with different ids. Means multiple drop able areas.

The problem is that I don’t have the idea that how can I get id the of the div where the item is dropped and how, I will show that product only in that div. Right now it is displaying all of the items in a single first div.

The main problem is that how can we create multiple droppable areas dynamically and drop an item in that specific area.

Thanks in Advance

  • 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-16T04:29:35+00:00Added an answer on May 16, 2026 at 4:29 am

    jQuery-UI Draggable Droppable event handler

    You need to get the droppable dom object from the event arguments passed to the drop method.

    $( ".selector" ).droppable({
      drop: function(event, ui) { 
        // $(this) represents the droppable.
        alert($(this).attr("id"));
      }
    });
    

    the draggable object can be referenced through ui.draggable. Most of this was taken from the jQuery-UI documentation found at the jQuery-ui Website

    Adding Droppable to a Dynamically Added Element

    In the event that the elements, let’s call them stage targets, are being added dynamically to the “stage” then you would want to call the droppable method on those elements when they are created.

    function makeStageTargets(i) {
      for(i;i--;true){
        var d = $("div").attr("id","item_"+i); // this will make a div id item_i
        $("stage").append(d);
        d.droppable(
          drop:function(e, ui){
            var param = $(ui.draggable).attr('src');
            $("stage").remove(ui.draggable); // this will remove an item when dropped
            addlist(param);
          });
      }
    }
    makeStageTargets(60);
    

    If I have missed the spirit of your question please advise.

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

Sidebar

Related Questions

I'm trying to create a gift wrapping module for Drupal commerce. I have created
I'm trying to create some cascading drop downs. I have my States loading via
I am trying to create a simple database where I have a table of
I am trying to wrap my head around items that will be displayed in
I'm trying to create a ListBox in which the text of the items is
I'm trying to create an app in Visual Basic that will allow a user
I am trying to create a regex that matches a US state abbreviations in
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
I am trying create a delegate representation of constructor by emitting a Dynamic Method,
Ok so I am trying create a login script, here I am using PHP5

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.