Pen Settings



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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


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


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.


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.


                <div id="form-ui">
  <label><input type="checkbox" value="mensfashion" /> men's fashion</label>
  <label><input type="checkbox" value="womensfashion" /> women's fashion</label>
  <label><input type="checkbox" value="kidsfashion" /> kid's fashion</label>

<div id="container">
  <div class="item" data-category="womensfashion mensfashion all">Zara</div>
  <div class="item" data-category="mensfashion womensfashion kidsfashion all">Gap</div>
  <div class="item" data-category="womensfashion all">Review</div>
  <div class="item" data-category="womensfashion all">ModCloth</div>
  <div class="item" data-category="mensfashion all">Industrie</div>
  <div class="item" data-category="mensfashion womensfashion kidsfashion all">Myer</div>
  <div class="item" data-category="kidsfashion all">Oshkosh B'gosh</div>


                * { box-sizing: border-box; }

body { font-family: sans-serif; }

.item {
  background: #ccc;
  width: 100px;
  height: 100px;
  float: left;
  margin: 5px;
  padding: 5px;

.item p {
  margin: 0;

select, label, input { font-size: 20px; }

label { margin-right: 10px; }


                // set up variables
var categoryFilters = [];
var categoryFilter;

// init Isotope
var $container = $('#container').isotope({
  itemSelector: '.item',
  filter: function() {
    var length = categoryFilters.length;
    if ( !length ) {
      return true;
    var $this = $(this);
    // check if all category filter match
    for ( var i=0; i<length; i++ ) {
      var catFilter = categoryFilters[i];
      if ( !$'[data-category*=' + catFilter + ']') ) {
        return false;
    // otherwise match
    return true;

// filter with checkboxes
var $checkboxes = $('#form-ui input');

$checkboxes.change( function() {
  categoryFilters = [];
  $checkboxes.each( function( i, elem ) {
    if ( elem.checked ) {
      categoryFilters.push( elem.value );
    console.log( categoryFilters.join(',') )