select

Download Select

If you can't read please download the document

Upload: adi-setyo

Post on 28-Sep-2015

214 views

Category:

Documents


1 download

DESCRIPTION

ok

TRANSCRIPT

#bootstrapSelectForm .selectContainer .form-control-feedback { /* Adjust feedback icon position */ right: -15px;} Favorite color Black Blue Green Orange Red Yellow White Language Arabic English French German Other Validate $(document).ready(function() { $('#bootstrapSelectForm') .find('[name="colors"]') .selectpicker() .change(function(e) { // revalidate the color when it is changed $('#bootstrapSelectForm').formValidation('revalidateField', 'colors'); }) .end() .find('[name="language"]') .selectpicker() .change(function(e) { // revalidate the language when it is changed $('#bootstrapSelectForm').formValidation('revalidateField', 'language'); }) .end() .formValidation({ framework: 'bootstrap', excluded: ':disabled', icon: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { colors: { validators: { callback: { message: 'Please choose 2-4 colors you like most', callback: function(value, validator, $field) { // Get the selected options var options = validator.getFieldElements('colors').val(); return (options != null && options.length >= 2 && options.length