creativetim
creativetim

Reputation: 1138

jQuery Columnize in IE8 throws error: 'nodeType' is null or not an object

I'm using jQuery Columnize 1.6.0 with jQuery 1.9.1. I'm also using the ubiquitous html5shiv and therein lies my problem.

I've created a test page so I can test out Columnize. I can't get it to work in IE8 without throwing the following error:

'nodeType' is null or not an object jquery.js, line 6234, character 2

When I remove the the shiv the page works as expected and viola, I have columns, but when the shiv is present I get the error.

Here is an extract of that area of jQuery (line 6234 is the first IF statement):

function cloneCopyEvent( src, dest ) {

if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
    return;
}

var type, i, l,
    oldData = jQuery._data( src ),
    curData = jQuery._data( dest, oldData ),
    events = oldData.events;

if ( events ) {
    delete curData.handle;
    curData.events = {};

    for ( type in events ) {
        for ( i = 0, l = events[ type ].length; i < l; i++ ) {
            jQuery.event.add( dest, type, events[ type ][ i ] );
        }
    }
}

// make the cloned public data object a copy from the original
if ( curData.data ) {
    curData.data = jQuery.extend( {}, curData.data );
}
}

Upvotes: 1

Views: 529

Answers (0)

Related Questions