Couple of issues. 1. You can use SlideToggle to reduce complexity alot. $("input.oneButton").click(function(){ $("#level2").slideToggle("slow"); });
However, you may WANT two buttons. 2. You can't really slideup a TR. Its not that flexible in that. I whipped up a demo to show a possible solution. http://www.commadot.com/jquery/selectors/slidingRow.htm There probably is an easier way, but this was my first thought. Glen On 7/20/07, debussy007 <[EMAIL PROTECTED]> wrote:
Hi, I try to apply effect on a very basic example, But I can't have it working. Can anyone help me with this ? Thank you !! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script type="text/javascript" src="js/jquery-1.1.3.1.pack.js"></script> <style type="text/css">#level2 {background-color:#DFEBFF;}</style> <script type="text/javascript"> $(document).ready(function(){ $("input.buttonBslidedown").click(function(){ $("#level2:hidden").slideDown("slow"); }); $("input.buttonBslideup").click(function(){ $("#level2:visible").slideUp("slow"); }); }); </script> <title></title></head> <body> <input type="button" value="Slide Out" class="buttonBslideup" /> <input type="button" value="Slide In" class="buttonBslidedown" /> <br/><br/> <table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr id="level2"> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table></body></html> -- View this message in context: http://www.nabble.com/Effect---Slide-Up-Down-tf4119902s15494.html#a11717084 Sent from the JQuery mailing list archive at Nabble.com.