Retrieving protrusion and collision data from jQuery Collision

I am using JQuery Draggable Collision ( found here ) and I am trying to resize the drag and drop area (blue square in my JSFiddle) via a simple toggleClass () right now.

As soon as it comes to life (getting bigger due to toggleclass link), I would like to measure the protrusion / collision data and subtract it from the height / width of the surrounding objects.

If debugging is enabled for the plugin, it will show you that it collects protrusion / collision data, but I donโ€™t understand how to use it to โ€œcompressโ€ red objects while the blue object gets bigger.

This JSfiddle will understand my question more.

JSFiddle: http://jsfiddle.net/jVABm/

And another example of what I'm looking for: http://www.adidas.com/us/homepage.asp

Any help POSSIBLE is much appreciated. Iโ€™m not sure how and if I can, but I would be ready to help for help.

UPDATE : http://jsfiddle.net/tmort/hCw2A/ - I wrote code for dynamically resizing mailboxes according to height. Now I am working on the following problems:

  • Measuring the width and applying the same effect do not work.

  • The height does not work if the fields are next to each other.

  • I want to apply an Isotope script to the size of the script I wrote.

+4
source share
2 answers

Check out jquery Freemasonry http://masonry.desandro.com/ and this: jquery Masonry, add a new div to the center of the container div # this is not quite what you need, but it can be useful

0
source

Sorry, this has never been designed with size in mind. This is on an endless line of things to do in the future. If you need a workaround, there is one:

Odd behavior when using jQuery draggable AND resizable with jquery collision 1.0.1

0
source

All Articles