Last active
August 29, 2015 14:26
-
-
Save FirstVertex/b083f8737ed43d83a997 to your computer and use it in GitHub Desktop.
Select2 with Primary selected item 3/4
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
$(function() { | |
// create an instance of PrimarySelect2 and attach to our Troop selector | |
// we set no special Select2 options. you could pass the normal Select2 options struct here, it will be passed to Select2 constructor | |
var s2Options = {}; | |
var ps2 = PrimarySelect2($('#Troops'), s2Options); | |
// ps2 is your handle now to the PrimarySelect2 interface | |
// if you're in a dynamic form later during your cleanup just call | |
// ps2.destroy(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see here for all code