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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:55:34+00:00 2026-06-06T19:55:34+00:00

I am using jQuery UI sortable portlets to all the portlets I assign a

  • 0

I am using jQuery UI sortable portlets to all the portlets I assign a data id.
The HTML structure for one portlet element can be seen as follows:

 <div class="portlet" data-id= "6">
        <div class="portlet-header"><h6>Heading</h6></div>
        <div class="portlet-content">First Person</div>
        <div class="portlet-content">10</div>
      </div>

Now as similar to the demo as in the link above, I have three columns. To all the columns I have given an id of 1, 2, 3.

<div class="column" id="1">

the portlet structure resides inside these divs.

Now when a portlet is moved from one column to another, I can easily get the id of the column to which it has been placed as follows:

$( ".column" ).sortable({
    connectWith: ".column",
    handle: 'h6',
    receive: function(event, ui) {
      console.log(this);
    }

The only thing I want to get is, the data-id of the portlet that has been moved.

How can I get that?
The jsFiddle is here.

  • 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-06T19:55:36+00:00Added an answer on June 6, 2026 at 7:55 pm

    The element that was moved is available in the item property of the ui argument passed to the receive handler, so you can write:

    console.log(ui.item.data("id"));
    

    You will find an updated fiddle here.

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

Sidebar

Related Questions

I'm currently using the jQuery sortable plugin and one of the things I can
I've got 3 UL lists that are using sortable jquery.ui. All works great, but
I am using jquery portlets in my web application. http://jqueryui.com/demos/sortable/#portlets What I want to
I have two lists in which using jQuery sortable i can move the items
I'm using a jQuery sortable list in which you can drop (clone) items from
I am using jQuery Sortable. I have the HTML setup like so: <ul id='plan'>
I have two HTML lists, and am using JQuery sortable to drag between them.
I am using jQuery UI sortable portlets . The jqueryui sortable page refers to
I'm having a problem where sorting using jQuery UI Sortable fails when one of
I'm using jQuery UI sortable plugin to be able to select and sort items.

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.