nobleclem / jQuery-MultiSelect

Turn a multiselect list into a nice and easy to use list with checkboxes.
https://springstubbe.us/projects/jquery-multiselect/
MIT License
291 stars 216 forks source link

Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. #159

Closed webservsol closed 5 years ago

webservsol commented 5 years ago

Integrate your plugin with a certain CMS that requires jquery-1.7.1.min.js can't use higher version of jQUERY is causing issues on line 628

optionsList.append( containers );

Once this line is commented the error is gone however the values aren't loaded while if uncommented it returns an error

Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.

Any suggestions and help is highly appreciated.

nobleclem commented 5 years ago

I suspect that it has to do with this jquery issue. So based on that it changing line 628 to maybe

containers.forEach(function( item, index ){
    optionsList.append( item );
});

or

for( var i=0; i < containers.length; i++ ) {
    optionsList.append( containers[i] );
}

Out of curiosity what CMS are you using?