Created
July 24, 2017 18:36
-
-
Save subhajeet2107/8b19b8bd8c6fff9f6e26c1f8b40d33a9 to your computer and use it in GitHub Desktop.
selectize clone fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.selectize').each(function(){ | |
if ($(this)[0].selectize) { | |
var value = $(this).val(); // store the current value of the select/input | |
$(this)[0].selectize.destroy(); // destroys selectize() | |
$(this).val(value); // set back the value of the select/input | |
} | |
}); | |
$('.add-role-row-container').append($('.add-role-row')[0].outerHTML); | |
$('.selectize').each(function(){ | |
if (!$(this)[0].selectize) { | |
$(this).selectize(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment