Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet">
<link href="https://mdbootstrap.com/wp-content/themes/mdbootstrap4/css/compiled.min.css" rel="stylesheet"/>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div class="col">
    <select class="mdb-select" multiple>
      <option value="" disabled  selected>Choose your option</option>
      <option value="" disabled>Group 1</option>
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
      <option value="" disabled>Group 2</option>
      <option value="4">Option 4</option>
      <option value="5">Option 5</option>      
      <option value="" disabled>Group 3</option>
      <option value="6">Option 6</option>
      <option value="7">Option 7</option>
      <option value="8">Option 8</option>
      <option value="9">Option 9</option>      
    </select>
    <label>Example label</label>
  </div>
  
  <script src="https://code.jquery.com/jquery-1.11.3.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
  <script src="https://mdbootstrap.com/wp-content/themes/mdbootstrap4/js/compiled.min.js"></script>
</body>
</html>
 
$(function(){
  
  $('.mdb-select').material_select();
  
  $('.multiple-select-dropdown li').on('click', function() {
    var selectList = this.parentElement.childNodes;
    var selectPosition = $(this).prevAll().length;
    if(this.className.indexOf('disabled') != -1){
      for(var i=selectPosition+1; i<selectList.length; i++){
        var selectItem = selectList[i];
        if(selectItem.className.indexOf('disabled') == -1){
          selectItem.click();
        } else{
          return;
        }
      }
    }
  }); 
  
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
sky172839465pro
0viewers