summaryrefslogtreecommitdiffstats
path: root/js/jquery.multi-select.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/jquery.multi-select.js')
-rw-r--r--js/jquery.multi-select.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js
index b6c91b0..1127d16 100644
--- a/js/jquery.multi-select.js
+++ b/js/jquery.multi-select.js
@@ -3,7 +3,8 @@
'init' : function(options){
this.settings = {
disabledClass : 'disabled',
- emptyArray : false
+ emptyArray : false,
+ callbackOnInit: false
};
if(options) {
this.settings = $.extend(this.settings, options);
@@ -113,10 +114,11 @@
if (ms.find("option[value='']")){
ms.find("option[value='']").removeAttr('selected');
}
- if(method != 'init'){
+ if(method != 'init' || ms.data('settings').callbackOnInit){
selectedUl.trigger('change');
selectableUl.trigger('change');
- if (typeof ms.data('settings').afterSelect == 'function' && method != 'init') {
+ if (typeof ms.data('settings').afterSelect == 'function' &&
+ (method != 'init' || ms.data('settings').callbackOnInit)) {
ms.data('settings').afterSelect.call(this, value, text);
}
}