Domanda

I'm using chosen-select plugin to get more of a <select> it works fine inside the main page, but when I use it inside a modal window that's provided by UIKit, it does not work. Here is the code:

Initialize the plugin:

$(document).ready(function(){
var config = {
        '.chosen-select': {},
        '.chosen-select-no-results': { no_results_text: 'nothing found!' }
    }
    for (var selector in config) {
        $(selector).chosen(config[selector]);
    }
});

And every <select> that has .chosen-select class is affected by the plugin.

Here is the complete code: http://jsfiddle.net/maysamsh/xFv4W/8/

È stato utile?

Soluzione

Removing .chosen-select class and applying .chosen() after loading modal fixed it. Here is the code http://jsfiddle.net/maysamsh/xFv4W/13/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top