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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:29:17+00:00 2026-06-15T21:29:17+00:00

After searching a day and trying some solutions none worked for me. Draggables are

  • 0

After searching a day and trying some solutions none worked for me.

Draggables are list items inside <ul>. Droppable is on div next to it. Basic dragging for now, now cloning no helpers.

Onclick i want to:

  • get all the draggables positions from the droppable area. (absolute positions relative to document)

    • note: every <li> in the draggables position got an unique ID. (draggables list are build from ajax callback and so added the id while parsing xml: <li id="'+uid+'">…
    • I wish to retrieve all the positions in a string format, something like:
      var send_new_positions = “id1;x1,y2;id2;x2,y2”; Example: “1;108,57” means: li with id=1, xPos=108, yPos=57.

Problem:

I can’t old fashioned way onclick collect all list items inside the draggable area because there arent any. In debugger i see they don’t work that way, droppable stays clean, draggables are updated with inline styles, example: <li style="position: relative; left: -270px; top: 127px;" class="ui-draggable dropped">…

Should i instead build a selector for the draggables that finds each <li> with the class “ui-draggable dropped” and then extracts the positions?
I think that’s the harder way to go, after all i only get relative positions.

Should i instead add my logic to the drop: function() and add my string format to every <li> that is dropped. If so, how should i attach this string data to every dropped <li>?

What is the best way to go?

  • 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-15T21:29:18+00:00Added an answer on June 15, 2026 at 9:29 pm

    Loop on all your draggable elements and construct your string :

    $('#myButton').click(function(){
        var myStringPosition = null;
        $('.ui-draggable').each(function(){
            myStringPosition = $(this)[0].id + ';' + $(this).css('left') + ';' + $(this).css('top');
        });
    
        alert(myStringPosition);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After searching online and reading the Oracle documentation for this, I need some help
After searching through some existing libraries for JSON, I have finally ended up with
After searching the other questions none have answered the specific issue I have. We
I've been searching all day and found several similar issues, but none have resolved
After a futile day of searching related sites for kernels of information, I have
After a long day of searching, I still can't figure out how I can
I have been searching google for the past day and a half trying to
Google has plenty of results for similar problems, but after a day of searching,
after one day of searching and reading rfc's i haven't found any tip in
After searching around for quite a while and trying to come up with a

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.