| Shrinkwrap body element after dragging blocks
|
ScubaAddict

msg:4557401 | 2:30 pm on Mar 22, 2013 (gmt 0) | Hello - I am using jQuery to drag div elements. Think of my layout as one large box, with 2 small boxes next to each other below the big box. Those 2 smaller boxes are draggable. Users will drag those 2 smaller boxes onto the big box. The result will be printed out - and I have the big box roughly the size of a printed page. The smaller boxes cause there to be 2 printed pages. I want the body to shrink as they drag, or onmouseout - so if they entirely drag the small boxes on top of the big one, they aren't having to print a blank sheet of paper (which once held the smaller boxes). Anyone know how to dynamically shorten the body/html element that is keeping the page length once the small boxes are moved up? TIA!
|
ScubaAddict

msg:4557477 | 4:33 pm on Mar 22, 2013 (gmt 0) | Okay - I have figured out that the html box (documentElement) is the issue. So new question: Is it possible to reduce the document.documentElement.scrollheight with javascript? I can figure out the height needed, but document.documentElement.scrollheight = "700px"; document.documentElement.offsetheight = "700px"; doesn't work
|
ScubaAddict

msg:4557485 | 4:52 pm on Mar 22, 2013 (gmt 0) | Oops - nevermind. Figured it out. Needed to adjust the style: document.documentElement.style.height = "700px";
|
|
|