Re: [jQuery] Elements aren't expanding when appending new children
frando schrieb: - Changing the css to position: none and then back to position: block - changing the position css attribute to 'table-cell' Did you mean the position *property* or did you mean display? The values you are talking of are for the display property, so if you tried what you wrote, that wouldn't have had any effect. Browser ignore declarations with unkown (incorrect) property values. Do not confuse them. display: inline|block|table-cell|none|... position: static|relative|absolute|fixed -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elements aren't expanding when appending new children
When you have a problem like this, your first thought should be to look at the generated HTML using Microsoft's DevToolBar in IE or either FireBug or View Source Chart for Firefox. I moved Testnode up and then moved it to the right, then used FireBug's Inspect tool to reveal the generated HTML. This is what I saw: div id=main ul id=nodes class=sortable li id=node5 class=sortableitem /li li id=node1 class=sortableitem style=overflow: visible; height: 164px; display: block; width: 472px; opacity: 0.; ul id=nodes1 class=sortable li id=node3 class=sortableitem /li ... Do you see what went wrong? :-) -Mike My problem is that, when moving elements right (iow creating a new ul as a child to an existing li), the parent element is not expanding, so the newly created ul is overlapping with other elements. Just look at my example page: http://xcite-online.de/tests/jquery1/ http://xcite-online.de/tests/jquery1/ . The code is http://snipplr.com/view/1649/jquery-and-uls-on-the-flow/ here , the important part is this: $(../..,this).next().append(ul class='sortable'li class='item'foo/li/ul); ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elements aren't expanding when appending new children
I moved Testnode up and then moved it to the right, then used FireBug's Inspect tool to reveal the generated HTML. This is what I saw: Actually I left out part of it by mistake. Here's the entire UL: ul id=nodes class=sortable li id=node5 class=sortableitem/li li id=node1 class=sortableitem style=overflow: visible; height: 164px; display: block; width: 472px; opacity: 0.; ul id=nodes1 class=sortable li id=node3 class=sortableitem/li li id=node4 class=sortableitem/li li id=node2 class=sortableitem style=overflow: visible; height: 30px; display: block; width: 472px; opacity: 0.; span class=icons a class=moveup/a a class=movedown img src=img/go-down.png//a a class=moveleft img src=img/go-previous.png//a /span/li /ul span class=icons /span/li /ul node2 is the one I moved up and then to the right. -Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elements aren't expanding when appending new children
One more comment... As you probably figured out from looking at the generated source, the culprit is likely to be the animation code, which sets those unwanted attributes when it animates an item. So one good test would be to remove all animation and see if it generates better code. It will also make the interface more usable. The animation that's there now doesn't serve any purpose, and it's confusing. The elements shouldn't be zooming down to a point and then re-expanding. When I move a physical object it doesn't do that. Instead, if you want some useful animation, show the element moving from its old position to its new one, without any unnecessary size changes. -Mike In other words, the animation should help show what is actually happening, My problem is that, when moving elements right (iow creating a new ul as a child to an existing li), the parent element is not expanding, so the newly created ul is overlapping with other elements. Just look at my example page: http://xcite-online.de/tests/jquery1/ http://xcite-online.de/tests/jquery1/ . ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Elements aren't expanding when appending new children
Yeah, meant display of course, and tried it with display, and used display, and I have no idea why the hell I wrote position here ;) Klaus Hartl-3 wrote: frando schrieb: - Changing the css to position: none and then back to position: block - changing the position css attribute to 'table-cell' Did you mean the position *property* or did you mean display? The values you are talking of are for the display property, so if you tried what you wrote, that wouldn't have had any effect. Browser ignore declarations with unkown (incorrect) property values. Do not confuse them. display: inline|block|table-cell|none|... position: static|relative|absolute|fixed -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- View this message in context: http://www.nabble.com/Elements-aren%27t-expanding-when-appending-new-children-tf2617104.html#a7304818 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/