Jquery Jtable 对齐字段

Jquery Jtable align fields

如何在 jtable 中使字段居中对齐。我想让最后一个字段 (Stacks:) 居中对齐

fields: {
    ID: {
      key: true,
      create: false,
      edit: false,
      list: false
    },
    TID: {
      title: 'Type',
      width: '30%',
      inputClass: 'validate[required]',
      options: <%= DisplayCribOptions() %>
    },
    Number: {
      title: 'Crib No',
      width: '20%'
    },
    Name: {
      title: 'Name',
      width: '20%'
    },
    Stacks: {
      title: 'Configurable Stacks',
      width: '30%'
    }

使用 listClass 属性 将您自己的样式添加到字段。

Stacks: {
      title: 'Configurable Stacks',
      width: '30%',
       listClass: 'Stacksalign'

    }

在 class

中定义您的风格
.Stacksalign
{
    text-align: center;
}