嗨,我遇到了数据表(jquery)的问题,我自己无法解决。任何人都可以帮助我或给我一个提示吗?
问题是我的数据表的标题被移动并且格式不正确,如下图所示。
![在此处输入图像描述][1]
但是当我单击一个条目以对其进行排序时,它会更改格式并且一切正常。
![在此处输入图像描述][2]
我已经使用 jquery ui 选项卡将数据表包含在 jquery ui 对话框中。我的代码看起来像这样。
<script>
$(function() {
$("#rt").treeview();
$("button").button({
icons: {primary: "ui-icon-person"}}).click(function() {
var id = this.id;window.location="rightsmanagement?nutzerrechte_vergeben&show=3&refine=";
});
});
$.fn.tabbedDialog = function () {
this.tabs();
var wWidth = $(window).width();
var dWidth = wWidth * 0.8;
var dialogOptions = {
modal: true,width: dWidth,minHeight: 520};
this.dialog(dialogOptions);
this.find('.ui-tab-dialog-close').append($('a.ui-dialog-titlebar-close'));
this.find('.ui-tab-dialog-close').css({'position':'absolute','right':'0', 'top':'13px'});
this.find('.ui-tab-dialog-close > a').css({'float':'none','padding':'0'});
var tabul = this.find('ul:first');
this.parent().addClass('ui-tabs').prepend(tabul).draggable('option','handle',tabul);
this.siblings('.ui-dialog-titlebar').remove();
tabul.addClass('ui-dialog-titlebar');
}
$(document).ready(function() {
$('#controllerTab').tabbedDialog();
});
$(document).ready(function() {
$('#singleusertable').dataTable({
"sScrollY": "280px",
"bPaginate": false,
"bAutoWidth": false,
"oLanguage": {"sUrl": "style/table/sprache.txt"},
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [ 0 ] },
{ "sTitle": "Benutzername", "aTargets": [ 1 ] },
{ "sTitle": "Vorname", "aTargets": [ 2 ] },
{ "sTitle": "Nachname", "aTargets": [ 3 ] },
{ "sTitle": "Personalnummer", "aTargets": [ 4 ] },
{ "sTitle": "Abteilung", "aTargets": [ 5 ] },
{ "bVisible": false, "aTargets": [ 6 ] },
{ "sWidth": "25%", "aTargets": [ 1] },
],"aaSorting": [[0, 'desc']]
});
});
</script>
提前谢谢提示..