How to use CSS3 to resize table rows

大憨熊 提交于 2019-12-12 14:41:58

问题


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.


回答1:


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/



来源:https://stackoverflow.com/questions/12689792/how-to-use-css3-to-resize-table-rows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!