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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:24:55+00:00 2026-05-31T13:24:55+00:00

Ok so I have a normal jQuery UI sortable, and I need to select

  • 0

Ok so I have a normal jQuery UI sortable, and I need to select the div in which I’m dropping my element into. I normally get this by using ui.item.parent(‘div’) in the received event.

However, on the over event that variable relates to the sender of the element (where it has been dragged from) rather than what it is hovering over. So how do I select where I am dropping my element.

An example I have at the moment that just prints the parent element’s offset:

$(".connectedSortable").sortable({
    over:function(event,ui){

        console.log(ui.item.closest('div').offset())
},
connectWith: ".connectedSortable"
}).disableSelection();

edit:

I created a really simple example to show what I am doing:

http://jsfiddle.net/2Zbwc/4/

Basically when you drag a row from the first table to the next one you see in the console that it has offset.left as 0. I need the offset.left of the new table.

  • 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-31T13:24:56+00:00Added an answer on May 31, 2026 at 1:24 pm

    You could use a placeholder and then select the parent of the placeholder class.

    http://jsfiddle.net/BnZMA/

    $( ".sortable" ).sortable({
        connectWith: '.sortable',
        helper: 'clone',
        placeholder: "placeholder",
        over:function(event,ui){
            console.log($('.placeholder').parent().attr('id'));
        },
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a custom joomla template which i load jquery in using the normal
I have a jQuery selector: div div ul li.normal a, div div ul li.massive
i was just wondering if a jQuery.get() request have any difference to a normal
I have a jQuery script, this sets an element's width to 50% via the
I have a table I'm using jQuery UI's sortable on. In the table, I
I have this jquery code that for a normal browser allows you to have
I have making an AJAX wizard using JQuery and I'm trying to get the
I have a normal dropdown which I want to get the currently selected index
I am using C# and Windows Forms. I have a normal progress bar working
I have turned a normal PHP class into a library so I can use

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.