summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorlou <louiscuny@gmail.com>2013-05-24 19:23:46 +0200
committerlou <louiscuny@gmail.com>2013-05-24 19:23:46 +0200
commit336010e015aedf83d8206b21731a6592f095a274 (patch)
treeaca9719a02c216de5722ad01c0d95030887b2e44 /js
parentae7a170e6b98f99f8d4bce8884b3fe1b0617fe62 (diff)
downloadmulti-select-336010e015aedf83d8206b21731a6592f095a274.zip
multi-select-336010e015aedf83d8206b21731a6592f095a274.tar.gz
multi-select-336010e015aedf83d8206b21731a6592f095a274.tar.bz2
add a destroy method
Diffstat (limited to 'js')
-rw-r--r--js/jquery.multi-select.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js
index 54f8ed4..ff37d66 100644
--- a/js/jquery.multi-select.js
+++ b/js/jquery.multi-select.js
@@ -290,9 +290,13 @@
},
'refresh' : function() {
+ this.destroy();
+ this.$element.multiSelect(this.options);
+ },
+
+ 'destroy' : function(){
$("#ms-"+this.$element.attr("id")).remove();
this.$element.removeData('multiselect');
- this.$element.multiSelect(this.options);
},
'select' : function(value, method){