Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Handling Scroll bars with jQuery event Drag and Drop

I have a room div with some toy divs arranged on it, see alt text

Toys are absolutly positioned and are drag-able with in the walls of the room . The room container div has a fixed height and height, so the room has horizontal as well as vertical scrolls. I use jquery event drag plug-in for setting up DnD. I managed to set up the toys drag only with in the lomits of the wall, but when there are scrolls, component is moving a little ouside the wall (only up to the actual width of the wall).

I want to show only a portion of the toy as shown below alt text

I tried setting the z-index, but has no effect, any one has better idea?

like image 468
Mithun Sreedharan Avatar asked Jul 26 '10 10:07

Mithun Sreedharan


2 Answers

Withouth seeing the actual code, i guess overflow:hidden could solve this?

like image 126
Peter Smeekens Avatar answered Oct 19 '22 23:10

Peter Smeekens


You can used scrollTo plugin http://demos.flesler.com/jquery/scrollTo/ to work with scrollbars

like image 37
JQuery Guru Avatar answered Oct 20 '22 00:10

JQuery Guru