summaryrefslogtreecommitdiffstats
path: root/js/application.js
blob: 8a88524d54ebf787632ca5b1034b6b673a6057f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(function($){
  $(function(){
    $('.multiselect').multiSelect();
    
    $('#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)