Devin Crossman Devin Crossman - 1 month ago 13
jQuery Question

jquery datatables FixedColumns not defined

I'm attempting to use the jquery datatables plugin and following the FixedColumns example
but I'm getting the error

Error: ReferenceError: FixedColumns is not defined Line: 64
. I'm trying to make the leftmost column fixed so while you scroll horizontally you can still see the first column.

I have set up an example in jsbin that shows the error. Is FixedColumns a separate plugin to download? I couldn't find it if it is. Anyone able to explain why my code isn't working?

Answer

That FixedColumns plugin needs some update, browser console currently reports

TypeError: $.browser is undefined @ http://www.datatables.net/release-datatables/extras/FixedColumns/media/js/FixedColumns.js:99;

$.browser was removed from jQuery 1.9, so you can either use jQuery 1.8.3 instead: http://jsbin.com/uziwin/4/edit

or add the browser detection back to jQuery 1.9+ with some additional plugin: https://github.com/mattberg/jquery-browser ; http://jsbin.com/uziwin/11/edit

Comments