Thomas
Thomas

Reputation: 4719

jQuery sortable plugin problem

I am using jQuery's sortable plugin to sort some lists.

The lists I have are a lot, making the page scroll.

The problem is that when I click to drag an element that is in a portion of the page that has been scrolled, the plugin seems to not be able to calculate correctly the element's top offset.

As a result, the mouse is on one point of the page and the element is on an other. The element is being dragged but it is not under the mouse.

Inspecting with firebug while dragging the element, I see that the top attribute is not correct. It is, as if the plugin does not calculate the body scroll.

Anyone experienced something similar?

Thanks

Upvotes: 1

Views: 191

Answers (1)

Thomas
Thomas

Reputation: 4719

Just found it

I had position : relative to the ul that contained the li's.

That was the culprit. Removing it, fixed it

Hope it will help someone in the future

Upvotes: 2

Related Questions