Re: [jQuery] how do i use display: table-row; instrad of display: block; with the show() effect on table rows?
Mark schrieb: Thanx that did the trick. also importand to add is that a table MUST HAVE tbody and /tbody :) if you don`t have that it will get messy again :P That's because browsers add that element implicitly, even if you left it out. (Same with the body element for example). -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] how do i use display: table-row; instrad of display: block; with the show() effect on table rows?
Thanx, i wasn`t aware of that. 2007/2/26, Klaus Hartl [EMAIL PROTECTED]: Mark schrieb: Thanx that did the trick. also importand to add is that a table MUST HAVE tbody and /tbody :) if you don`t have that it will get messy again :P That's because browsers add that element implicitly, even if you left it out. (Same with the body element for example). -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] how do i use display: table-row; instrad of display: block; with the show() effect on table rows?
Hey,well the title really says it all..i`m trying to add/delete table rows with jquery and that`s working.. the bad thing is that jquery makes the rows that i do with the show() effect (this line: $(newObject).show(slow);) with display: block; and that distroys the way the table should look. if i could just set it to table-row just for the ones where that`s needed..and that`s the question. how do i make it so that when the show() effect is done on divs it`s using display: block; and when it`d don`t on table elements it should be using display: table-row; perhaps a syntax change for the effects? adding this option..?Any help would be gread.Thanx in favor. _ Leef je uit: ontwerp je startpagina precies zoals jij het wil hebben op Live.nl. http://www.live.com/getstarted___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] how do i use display: table-row; instrad of display: block; with the show() effect on table rows?
maybe something like this: $(newObject).show(slow, function() { $(this).css(display, table-row) }); //Kristinn On 2/25/07, Mark [EMAIL PROTECTED] wrote: Hey, well the title really says it all.. i`m trying to add/delete table rows with jquery and that`s working.. the bad thing is that jquery makes the rows that i do with the show() effect (this line: $(newObject).show(slow);) with display: block; and that distroys the way the table should look. if i could just set it to table-row just for the ones where that`s needed.. and that`s the question. how do i make it so that when the show() effect is done on divs it`s using display: block; and when it`d don`t on table elements it should be using display: table-row; perhaps a syntax change for the effects? adding this option..? Any help would be gread. Thanx in favor. Probeer Live.com: je eigen persoonlijke opstartpagina met alleen de dingen die jij belangrijk vindt op één plek. binnen één omgeving. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] how do i use display: table-row; instrad of display: block; with the show() effect on table rows?
Thanx that did the trick.also importand to add is that a table MUST HAVE tbody and /tbody :) if you don`t have that it will get messy again :Pbut thanx alot for fixing this issue. Date: Sun, 25 Feb 2007 23:39:37 +0100 From: [EMAIL PROTECTED] To: discuss@jquery.com Subject: Re: [jQuery] how do i use display: table-row; instrad of display: block; with the show() effect on table rows? maybe something like this: $(newObject).show(slow, function() { $(this).css(display, table-row) }); //Kristinn On 2/25/07, Mark [EMAIL PROTECTED] wrote: Hey, well the title really says it all.. i`m trying to add/delete table rows with jquery and that`s working.. the bad thing is that jquery makes the rows that i do with the show() effect (this line: $(newObject).show(slow);) with display: block; and that distroys the way the table should look. if i could just set it to table-row just for the ones where that`s needed.. and that`s the question. how do i make it so that when the show() effect is done on divs it`s using display: block; and when it`d don`t on table elements it should be using display: table-row; perhaps a syntax change for the effects? adding this option..? Any help would be gread. Thanx in favor. Probeer Live.com: je eigen persoonlijke opstartpagina met alleen de dingen die jij belangrijk vindt op één plek. binnen één omgeving. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ _ Probeer Live.com: jouw leven online met nieuws, sport, weer en nog veel meer. http://www.live.com/getstarted___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] how do i use display: table-row; instrad of display: block; with the show() effect on table rows?
Hi, Mark. I've been working with showing/hiding tables rows a little and would like to see how your solution is working.got a sample online that I can view? Rick From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Sent: Sunday, February 25, 2007 5:59 PM To: jQuery Discussion. Subject: Re: [jQuery] how do i use display: table-row; instrad of display: block; with the show() effect on table rows? Thanx that did the trick. also importand to add is that a table MUST HAVE tbody and /tbody :) if you don`t have that it will get messy again :P but thanx alot for fixing this issue. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] how do i use display: table-row; instrad of display: block; with the show() effect on table rows?
Sorry, i don`t have a working somaple online.. it`s all running on my localhost. but i can tell you that IE is the biggest hell in cloning table rows.. (i`m cloning them.. not showing/hiding) but here is the javascript and the html for you: // javascript: function cloneObject(gdiv, insdiv, type) { var obj = document.getElementById(gdiv); //Div die gekloond wordt var dest = document.getElementById(insdiv); //Div waar het nieuwe object ingeplaatst wordt var display = (type == 'table') ? 'table-row' : 'block'; var newObject = obj.cloneNode(true); //het object clonen if ($.browser.mozilla || type != 'table') { newObject.style.display = 'none'; dest.appendChild(newObject); $(newObject).show(slow, function() {$(this).css(display, display)}); } else if ($.browser.msie) { newObject.style.display = 'block'; //het object visible maken return dest.appendChild(newObject); // het object toevoegen aan de destination } else { dest.appendChild(newObject); } return newObject.style.display = display; //het object visible maken } function removeThisTR(obj) { return ($.browser.mozilla) ? $(obj.parentNode).hide(slow, function(){ obj.parentNode.parentNode.removeChild(obj.parentNode);}) : obj.parentNode.parentNode.removeChild(obj.parentNode); } // html form method=post action=admin.php ?act=settingsamp;type=e_menuamp;go=go table width=100% border=0 cellspacing=0 cellpadding=0 tbody id=insertHere2 { foreach value=item from=$menu_items } tr td Name: input type=text name=name[] value={ $item.name } / /td td URL: input type=text name=url[] value={ $item.url } / /td td Style: input type=text name=style[] value={ $item.custom_style } / /td td Div ID: input type=text name=div_id[] value={ $item.div_id } / /td td Order: input type=text name=order[] value={ $item.order } /img src=./templates/images/btn-close.gif alt= title=Delete this row style=border-style: none; onclick=removeThisTR(parentNode); / /td /tr { /foreach } /tbody /table div style=text-align: center; input type=button onclick=cloneObject('getDiv2', 'insertHere2', 'table') value=Add menu entry name=clone / input type=submit value=Apply Changes style=margin-top: 2ex; / /div /form table tr style=display:none; id=getDiv2 td Name: input type=text name=name[] / /td td URL: input type=text name=url[] / /td td Style: input type=text name=style[] / /td td Div ID: input type=text name=div_id[] / /td td Order: input type=text name=order[] value=0 /img src=./templates/images/btn-close.gif alt= title=Delete this row style=border-style: none; onclick=removeThisTR(parentNode); / /td /tr /table - you will only need to add in the html tags, the jquery library and most likely the interface library. good luck :) and let me know what you think of it. 2007/2/26, Rick Faircloth [EMAIL PROTECTED]: Hi, Mark… I've been working with showing/hiding tables rows a little and would like to see how your solution is working…got a sample online that I can view? Rick *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Mark *Sent:* Sunday, February 25, 2007 5:59 PM *To:* jQuery Discussion. *Subject:* Re: [jQuery] how do i use display: table-row; instrad of display: block; with the show() effect on table rows? Thanx that did the trick. also importand to add is that a table MUST HAVE tbody and /tbody :) if you don`t have that it will get messy again :P but thanx alot for fixing this issue. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/