Using FixedHeader without DataTables returns error.
Using FixedHeader without DataTables returns error.
razzildinho
Posts: 1Questions: 0Answers: 0
I'm trying to use FixedHeader without using DataTables on the table.
Using the function [code]new FixedHeader( document.getElementById('summary_grid') );[/code]
This works fine if I have applied dataTables to the table first but if not gives an error of:
Chrome [code]TypeError: Object # has no method 'fnSettings'[/code]
Firefox [code]TypeError: a.fnSettings is not a function[/code]
Unfortunately the page is still being developed so I can't link to it.
Edit:
I have a feeling the error is happening because I am using two different versions of jQuery on the page using jQUery.noConflict(true).
[code]
var _$ = jQuery.noConflict(true);
[/code]
Edit again:
It seems to only be a bug in the latest version of fixedHeader. 2.0.6 works perfectly.
Using the function [code]new FixedHeader( document.getElementById('summary_grid') );[/code]
This works fine if I have applied dataTables to the table first but if not gives an error of:
Chrome [code]TypeError: Object # has no method 'fnSettings'[/code]
Firefox [code]TypeError: a.fnSettings is not a function[/code]
Unfortunately the page is still being developed so I can't link to it.
Edit:
I have a feeling the error is happening because I am using two different versions of jQuery on the page using jQUery.noConflict(true).
[code]
var _$ = jQuery.noConflict(true);
[/code]
Edit again:
It seems to only be a bug in the latest version of fixedHeader. 2.0.6 works perfectly.
This discussion has been closed.
Replies
I have a complex table (that use colspan) so I can't and don't need to use DataTables.
That's what I did:
With FixedHeader 2.1.0
--------------------------------
[code]
new $.fn.dataTable.FixedHeader($('table'))
[/code]
Without including DataTables javascript:
[quote]Uncaught TypeError: Cannot read property 'FixedHeader' of undefined[/quote]
in line 1050.
Including DataTables javascript (1.10.0-beta.2):
[quote]Uncaught TypeError: Cannot set property '_oPluginFixedHeader' of undefined[/quote]
in line 137.
With FixedHeader 2.0.6
--------------------------------
[code]
new FixedHeader($('table')[0])
[/code]
And it works fine event without including DataTables javascript.
Acctualy, I had to remove jQuery.browser commands from 2.0.6 since it dosn't work with newer versions of jQuery.