Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use CSS3 to resize table rows

I have this jsfiddle that hides tables rows.

I am trying to get it to expand the row to height=200 instead of hiding it.

Feel free to suggest an easier method of doing it (html5, etc) as well.

like image 643
novicePrgrmr Avatar asked Dec 12 '25 19:12

novicePrgrmr


1 Answers

You can use jQuery toggle() with two functions as parameters. Documentation. It allows you to define two or more functions to cycle through on each mouse click.

$(document).ready(function()
{
//slide up and down when click over id #one
$("#one").toggle(
    function()
        {
        $(".togglebox").height(200);
        },
    function()
        {
        $(".togglebox").height(100);
        });
});

Working demo: http://jsfiddle.net/RNvP4/

like image 78
babca Avatar answered Dec 15 '25 08:12

babca



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!