Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <form action="" class="form">
  <div class="form-group">
    <div class="form-group__block">
      <div class="form-group__title">Choose platform</div>
      <input type="checkbox" name="platform-all" class="form__check" id="platform-all">
      <label for="platform-all">All</label>
    </div>
    <div class="form-group__block">
      <input type="checkbox" name="platform-opensea" class="form__check" id="platform-opensea">
      <label for="platform-opensea">Opensea</label>
    </div>
    <div class="form-group__block">
      <input type="checkbox" name="platform-makersplace" class="form__check" id="platform-makersplace">
      <label for="platform-makersplace">Makersplace</label>
    </div>
    <div class="form-group__block">
      <input type="checkbox" name="platform-foundation" class="form__check" id="platform-foundation">
      <label for="platform-foundation">Foundation</label>
    </div>
  </div>
  <div class="form-group">
    <div class="form-group__block">
      <div class="form-group__title">Choose status</div>
      <input type="checkbox" name="status-all" class="form__check" id="status-all">
      <label for="status-all">All</label>
    </div>
    <div class="form-group__block">
      <input type="checkbox" name="status-sold" class="form__check" id="platform-sold">
      <label for="platform-sold">Sold</label>
    </div>
    <div class="form-group__block">
      <input type="checkbox" name="status-auction" class="form__check" id="platform-auction">
      <label for="platform-auction">Under Auction</label>
    </div>
  </div>
  <div class="form-group">
    <div class="form-group__block">
      <div class="form-group__title">Choose cause</div>
      <input type="checkbox" name="cause-all" class="form__check" id="cause-all">
      <label for="cause-all">All</label>
    </div>
    <div class="form-group__block">
      <input type="checkbox" name="cause-trees-future" class="form__check" id="cause-trees-future">
      <label for="cause-trees-future">Trees for the Future</label>
    </div>
    <div class="form-group__block">
      <input type="checkbox" name="cause-energy-honduras" class="form__check" id="cause-energy-honduras">
      <label for="cause-energy-honduras">Wind energy in Honduras (Offsetra)</label>
    </div>
  </div>
  <button type="submit" class="form__btn">Сгруппировать</button>
</form>
<div class="inputs">
  <div class="inputs__item">
    <div class="inputs__title">Platform:</div>
    <div class="inputs__value inputs__value--platform">тут имена инпутов platform</div>
  </div>
   <div class="inputs__item">
    <div class="inputs__title">Status:</div>
    <div class="inputs__value inputs__value--status">тут имена инпутов status</div>
  </div>
   <div class="inputs__item">
    <div class="inputs__title">Cause:</div>
    <div class="inputs__value inputs__value--cause">тут имена инпутов cause</div>
  </div>
</div>
              
            
!

CSS

              
                body {
  font-size: 18px;
}

.form {
  margin-bottom: 20px;
}

.form-group__block, .inputs__item {
  margin-bottom: 15px;
}

.form-group__title, .inputs__title {
  margin-bottom: 10px;
  font-weight: 700;
}
              
            
!

JS

              
                var checkAllName;

$('.form__check').on('click', function() {
    if ($(this).is(':checked') && $(this).attr('name').split('-')[1] == 'all') {
      checkAllName = $(this).attr('name');
      
      $(this).closest('.form-group').find('.form__check').prop('checked', true);
    } else if (!$(this).is(':checked')) {
      if ($(this).attr('name').split('-')[1] == 'all') {
         $(this).closest('.form-group').find('.form__check').prop('checked', false);
       } else { 
         $(this).closest('.form-group').find('.form__check[name="' + checkAllName + '"]').prop('checked', false);
       }
    }
});

$('.form').on('submit', function(e) {
    e.preventDefault();
   var arrNameInput = [];
  $('.form__check').each(function() {
    if ($(this).is(':checked')) {
      var $allCheck  = $(this).attr('name').split('-'),
          firstCheck = $allCheck[0];
      
          $allCheck.splice(0, 1);  
          console.log(arrNameInput);
          if (firstCheck) {
              arrNameInput.push($allCheck.join('-'));
            
              $('.inputs__value--' + firstCheck).text(arrNameInput.join(','));
          }
    }
    });
});
              
            
!
999px

Console