Created
June 7, 2012 19:52
-
-
Save esbanarango/2891164 to your computer and use it in GitHub Desktop.
Chosen.js set the number of multiple select that you want.
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
º/*In this example I want the user to choose maximum 2*/ | |
$('#id').chosen().change(function(event) { | |
if($(this).val()!=null){ | |
if ($(this).val().length > 1) { | |
$(".chzn-drop").css("display","none"); | |
} | |
if ($(this).val().length < 2) { | |
$(".chzn-drop").css("display","block"); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment