- Create Account

Push other divs out the way

Forums > DragResize > Push other divs out the way
Author
Message

1) graham01 Group: Members
Posts: 8 Joined: 21 Feb 2008 Location: england IP: 90.202.--.--
Hey, this script is amazing and exactly what I am looking for, i think anyway..

I'm using the snap to grid one which i found on this forum (very neat work), I only need to be able to drag and resize vertically, which should help this problem a bit.

Basically, when an item is resized and contacts another item, I would like the other item to get pushed out the way on contact, so there is no overlapping. The same for dragging an item. This cannot be a list where items swap places.

Thanks a lot.
graham

2) Angus Turnbull Group: Moderators
Posts: 4235 Joined: 7 Dec 2003 Location: New Zealand IP: 203.109.--.--
Hmm, one of the unadvertised features of this script is that it might be able to work with inline positioned elements, as in elements that directly follow each other in the document flow. Try messing around with the CSS and see what turns up.

Otherwise, you'd need to write a script that checks each element's position as you drag and moves them accordingly. Check the script's events, you can hook into "ondragmove" which would be suitable.

- Angus.

3) graham01 Group: Members
Posts: 8 Joined: 21 Feb 2008 Location: england IP: 90.204.--.--
Thanks for the reply, I honestly wouldnt know where to start for this :( any chance you could give me a hand?

Thanks

4) Angus Turnbull Group: Moderators
Posts: 4235 Joined: 7 Dec 2003 Location: New Zealand IP: 203.109.--.--
Well, the above is as much as I can realistically offer for free. If you want to hire me to implement something for you, drop me a line at /contact/ (note that I'm on holiday for the next week though!)

- Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.