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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:03:14+00:00 2026-05-23T22:03:14+00:00

I did some searching and couldn’t find an answer to this, plus did some

  • 0

I did some searching and couldn’t find an answer to this, plus did some messing around with the code to no avail. I have a standard jQuery UI draggable and droppable setup which works.

However when items (in this case shoes) are dragged into the droppable target area, they appear to be appended, so old items stay at the front and new items get added on the end and pushed out of view.

Is there a way of having the sortable items prepend to my target droppable as opposed to being appended?

Edit **

var proto = $.ui.droppable.prototype;

proto._create = function() {

    console.log('Calling the create method');

    var o = this.options, accept = o.accept;
    this.isover = 0; this.isout = 1;

    this.accept = $.isFunction(accept) ? accept : function(d) {
    return d.is(accept);
    };

    //Store the droppable's proportions
    this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };

    // Add the reference and positions to the manager
    $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
    $.ui.ddmanager.droppables[o.scope].unshift(this);

    (o.addClasses && this.element.addClass("ui-droppable"));
};
  • 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-23T22:03:15+00:00Added an answer on May 23, 2026 at 10:03 pm

    Yes, though it’s pretty complicated. You’ll need to extend the JQueryUI ui.droppable object modifying the _create function. Currently it uses push to add your new item to the end of the array, like so:

    $.ui.ddmanager.droppables[o.scope].push(this);

    You’ll want to use unshift:

    $.ui.ddmanager.droppables[o.scope].unshift(this);

    JQuery droppable source:
    https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.droppable.js

    JavaScript unshift() documentation:http://www.w3schools.com/jsref/jsref_unshift.asp

    Tutorial for extending JQueryUI widgets: http://bililite.com/blog/extending-jquery-ui-widgets/

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

Sidebar

Related Questions

Did some googling and couldn't find a clear answer on this. My assumption is
Apologies if this was answered elsewhere -- I did some searching and couldn't find
I did some quick searching on the site and couldn't seem to find the
I did do some googling and searching on this site but did not find
I did some searching but couldn't find any sample/example. I've a requirement where geo
My apologies if this has been answered before or is obvious...did some searching here
I did some googling to try to answer this question but even after that
I did some fairly thorough reading and searching through SO and didn't find anything
I have just written some code, which as i was writing i thought, this
I did some searching on this site and on google as well. But i

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.