ethanmiller / jQuery-Simple-Multi-Select

jQuery plugin that replaces standard HTML multi-select with a simpler version
http://ethanmiller.name/notes/jquery_simplemultiselect
4 stars 1 forks source link

Newer jquery compatibility #1

Open mlasky opened 13 years ago

mlasky commented 13 years ago

I think there might be an issue with the current implementation and newer versions of jQuery (didn't data()'s interface change in 1.6... i think?)

Anyway, I got it working with jQuery 1.6.1 by changing line 111:

        var dv = $('<div/>')
            .text(op.text())
            .data('selected', op.attr('selected'))
            .data('disabled', disabled);

to:

        var dv = $('<div/>')
            .text(op.text())
            .data(this, 'selected', op.attr('selected'))
            .data(this,'disabled', disabled);
ethanmiller commented 13 years ago

thanks @mlasky I will have a look at this ...