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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:07:44+00:00 2026-06-02T19:07:44+00:00

I Have the following problem: After an item was being dragged out from the

  • 0

I Have the following problem: After an item was being dragged out from the “sortable_pics_selected” list into the other list there is an event being fired with jquery ui “remove” event handler:

–>fiddle: http://jsfiddle.net/4DBLj/3/ <—

 $("#sortable_pics_selected").sortable({
            remove: function(event, ui) {
                alert('hi);
            }
        });


<div id="sortablecontainer_pic"> 
   <ul id="sortable_pics_all" class="connectedSortable">
      <li class="ui-state-default">Item 1</li>
      <li class="ui-state-default">Item 2</li>
      <li class="ui-state-default">Item 3</li>
      <li class="ui-state-default">Item 4</li>
      <li class="ui-state-default">Item 5</li>
   </ul>

   <ul id="sortable_pics_selected" class="connectedSortable">
      <li id="1" class="ui-state-highlight">Item 1</li>
      <li id="2" class="ui-state-highlight">Item 2</li>
      <li id="3" class="ui-state-highlight">Item 3</li>
      <li id="4" class="ui-state-highlight">Item 4</li>
      <li id="5" class="ui-state-highlight">Item 5</li>
   </ul>
</div>  

Is there a way to figure out which id the removed item has? The above function just fires in general when any item was removed…what might be the best way to get the individual id? Is there a jquery ui function that can do this? If this is not the case…the remove method seems to me not being the right thing. I could write it in pure jquery but for this things jquery ui was build? Did i misunderstand something?

  • 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-02T19:07:47+00:00Added an answer on June 2, 2026 at 7:07 pm

    Based on your Fiddle, here is the final code

    http://jsfiddle.net/4DBLj/5/

    Get the id attribute of the ui item:

    alert(ui.item.attr('id'));
    

    EDIT: Regarding the ui.item comment “where i can read about the ui.class”.

    jQuery UI has documentation on each of the widgets. While many include “ui” the actual content of that may vary. For the Sortable see this page:

    http://jqueryui.com/demos/sortable/
    Under the “Overview” tab. There you will find a reference to ui.item – the current dragged item. Which, in this instance has an attribute of “id” because you included one in your code “id=”” for that object.

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

Sidebar

Related Questions

I have the following problem, from c++ I send huge string[] to java. huge
if have the following problem: I have a List which i am going through
I have the following problem when updating a for via AJAX after it is
I ran into following problem already multiple times. Say you have two classes, classA
I have following problem: I have to make a ASP.NET Webapplication with a two-row
I have following problem: I have built a tabbar application with 4 tabs. I
I have following problem, Code: String a=Yeahh, I have no a idea what's happening
Hi i have following Problem. I write a Mediawiki Extension where i need some
I am using GWT/JAVA for development. I have following problem: I want to remove
I have the following problem. I have embedded a map using Google Maps' API.

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.