lucasKo
lucasKo

Reputation: 185

jQuery UI Draggable with grid and containment has weird offset

Situation

I am trying to create a slider bar on my own instead of using jQuery slider widget.

However, I found that while using jQuery draggable widget, it created a weird offset on the left every time I clicked the handle inside the slider. And the handle had no way to get back to original position.

Is this situation related to the CSS box module? Or is there another reason that causes this problem?

How can I fix it?

Code

Here's my code in jsFiddle. Thanks!

Upvotes: 0

Views: 183

Answers (1)

rusln
rusln

Reputation: 1284

This css line causing is the problem:

transform: rotate(45deg);

solution : working fiddle

I'm not sure what the reason is behind it though :/

Upvotes: 1

Related Questions