【问题标题】:jquery jtable child table title indentjquery jtable子表标题缩进
【发布时间】:2014-11-07 03:42:30
【问题描述】:

我正在使用jquery.jtable,并且我有一行在jquery.jtable.js 中调用openChildTable 方法。

我正在尝试找到一种缩进子表标题的方法。这是创建表的代码:

function getResponseChildTable(ContainerID) {
    var table = {
        title: '',
        width: '5%',
        sorting: false,
        edit: false,
        create: false,
        display: function(data) {
            //create an image to be used to open child table
            var $img = $('<img src="' + config.base_url + 'assets/images/expand_row-small.png" title="View Responses" style="height:30px;width:30px;cursor:pointer;" height="30" width="30"/>');
            $img.click(function() {
                $('#' + ContainerID).jtable('openChildTable',
                        $img.closest('tr'),
                        {
                            title: 'Response Plans',
                            actions: {
                                listAction: config.base_url + "data_fetch/responses/" + data.record.risk_id
                            },
                            messages: defaultResponseMessages,
                            fields: getResponseFieldsSmall()
                        }, function(data) {//opened handler
                    data.childTable.jtable('load');
                });
            });
            //return image to show on row
            return $img;
        }
    };
    return table;
}

我尝试添加一个样式属性并设置一个向左的边距以将其横向移动,但没有成功。也许我做错了。因此,所有建议都值得赞赏。我已经发布了在 cmets 中的链接。

我是jquery.jtablejs 的新手,请原谅我的错误。

【问题讨论】:

标签: javascript jquery alignment jquery-jtable


【解决方案1】:

我能够使用 CSS 解决问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-05-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-24
    • 1970-01-01
    • 2011-02-01
    相关资源
    最近更新 更多