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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:33:02+00:00 2026-05-30T18:33:02+00:00

I am working on updating my own draggable script and I am wondering how

  • 0

I am working on updating my own draggable script and I am wondering how jquery-ui allows for you to have the position of an element set to relative and still allows for you to move it without affecting any of the elements around it that are also positioned relatively and floated?

As of right now my current script takes any element and gets its position but then sets it to absolute when you drag it, as a result all elements around it end up shifting to take its place.

My only two ideas are to:

a) Automatically set all elements on the page to position:absolute when I move one that’s draggable (seems really inefficient).

b) Create an invisible copy of the current element that will remain in the exact spot.

and the to essentially implement:

var e = document.getElementById('div');
console.log(document.defaultView.getComputedStyle(e, null).getPropertyValue("position"));

from which I can determine if either step a or b is even necessary at all.

However, from what I can tell, to me it seems like jquery-ui-draggable does neither of these.

Here is an example of this using jquery-ui-draggable: http://jsfiddle.net/aNk6e/17/

How can I accomplish that same effect?

  • 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-30T18:33:03+00:00Added an answer on May 30, 2026 at 6:33 pm

    This is how position: relative works. The element still affects the document as though it was in its original position, but can be moved.

    Consider this fiddle:

    http://jsfiddle.net/aNk6e/18/

    Notice how the other two items are still affected as though the element were in its original position but the element is moved.

    By simply manipulating top and left you can move the element around without affecting other elements in the document flow.

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

Sidebar

Related Questions

I have a simple script updating and showing a useraccount. (working with the management
I have been working on updating my gem (whm_xml at https://github.com/ivanoats/whm_xml_api_ruby ) to make
I've inherited a project I'm working on and I'm updating some jquery animations (very
I am working on my own graph drawing application. I have got the graph
I'm working on creating a self updating application and one issue I'm running into
I'm working on a project updating their WinForms application UI to be more consistent
I'm working on a project that requires a fair bit of inserting/updating rows in
One of my friend is working on issue related to updating expired digital certificates.
I am working through part4 of Symfony2 , and while updating the controller and
I'm working updating some legacy code that does not properly handle user input. The

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.