Jquery UI and table header

Jquery UI and table header

giannacciogiannaccio Posts: 1Questions: 0Answers: 0
edited June 2010 in General
this plugin when it's enabled ui option builds the tag "span" for the ui icon. Then css set this span position like absolute..
this is good but i had some problems in Explorer. I think because it's not set left and top properties together the absolute position.

The best for me woul be
[code]
.ui-state-default .ui-icon {
width:16px;
height:16px;
position:absolute;
left:0px;
top:0px;
}
[/code]
but I need th in position:relative;

unluckily firefox ignores the th like relative, so we need a hedear like:
[code]


my title

[/code]
so i changed the js script at the line 2427..
before was
[code]
oSettings.aoColumns[i].nTh.insertBefore( document.createElement('span'),
oSettings.aoColumns[i].nTh.firstChild );
[/code]

now
[code]
//2010-23-06 fix for position relative of div
var div=document.createElement('div');
div.innerHTML='';
oSettings.aoColumns[i].nTh.insertBefore( div ,
oSettings.aoColumns[i].nTh.firstChild );
[/code]


thanks for this good plugin

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Interesting change - probably not one I'l include in the main distribution for now (unless there is a big demand for it) - but good to see some hacking going on with the source :-). Thanks for posting your changes! Another way to go without altering the source would be to manipulate the DOM after DataTables initialisation.

    Regards,
    Allan
This discussion has been closed.