summaryrefslogtreecommitdiffstats
path: root/js/application.js
diff options
context:
space:
mode:
authorlou <louiscuny@gmail.com>2011-04-15 10:00:58 +0200
committerlou <louiscuny@gmail.com>2011-04-15 10:00:58 +0200
commit42800fa9cbd0a2747c89fe806a95dacea502af97 (patch)
tree2be59e27c202a1723b52331e5c917d33ba28a911 /js/application.js
parent179adc9b4e838c1459c331f0abc04d1dba14311b (diff)
downloadmulti-select-42800fa9cbd0a2747c89fe806a95dacea502af97.zip
multi-select-42800fa9cbd0a2747c89fe806a95dacea502af97.tar.gz
multi-select-42800fa9cbd0a2747c89fe806a95dacea502af97.tar.bz2
more demos
Diffstat (limited to 'js/application.js')
-rw-r--r--js/application.js31
1 files changed, 27 insertions, 4 deletions
diff --git a/js/application.js b/js/application.js
index fb90029..8a88524 100644
--- a/js/application.js
+++ b/js/application.js
@@ -1,9 +1,32 @@
(function($){
-
$(function(){
$('.multiselect').multiSelect();
- });
-
- hljs.initHighlightingOnLoad();
+
+ $('#callbackCountries').multiSelect({
+ afterSelect: function(value, text){
+ alert('Select element\nvalue: '+value+'\ntext: '+text);
+ },
+ afterDeselect: function(value, text){
+ alert('Deselect element\nvalue: '+value+'\ntext: '+text);
+ }
+ });
+ $('#selectFR').click(function(){
+ $('#outsideCountries').multiSelect('select', 'fr');
+ return false;
+ });
+
+
+ $('#deselectFR').click(function(){
+ $('#outsideCountries').multiSelect('deselect', 'fr');
+ return false;
+ });
+
+ $('#demos-menu li').click(function(){
+ $('#demos-menu li').removeClass('active');
+ $('#demos-content').children('div').hide();
+ $(this).addClass('active');
+ $('#demos-content .'+$(this).attr('id')).show();
+ });
+ });
})(jQuery) \ No newline at end of file