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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                
<script src="https://plugins.flockler.com/embed/16e88f68c280078e6c3cc65257156295/170861c6dd60038550eb9525afe88ce5?autoload=false"></script>

<nav class="flockler-embed-nav">
  <button class="active" onclick="renderFlocklerEmbed('', this)">
    Show all
  </button> 

  <button onclick="renderFlocklerEmbed('facebook', this)">
    Show Facebook
  </button>

  <button onclick="renderFlocklerEmbed('instagram', this)">
    Show Instagram
  </button>   

  <button onclick="renderFlocklerEmbed('twitter', this)">
    Show Twitter
  </button>
</nav>

<div id="flockler-embed-170861c6dd60038550eb9525afe88ce5"></div>
              
            
!

CSS

              
                body {
  font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
  max-width: 1000px;
  margin: 40px auto;
  text-align: center;
} 

.flockler-embed-nav {
  margin-bottom: 40px;
}

.flockler-embed-nav button {
  background: #fff;
  border: none;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.1), 0 4px 20px rgba(0,0,0,.05);
  font-size: 14px;
  font-weight: 600;
  padding: 1em 2em;
}

button.active {
  background: #0070dd; 
  color: #fff;
  cursor: pointer;
}
              
            
!

JS

              
                (function () {
  var interval;
  var embed;
  var embedUuid = '170861c6dd60038550eb9525afe88ce5';

  // Renders the embed with given content type and marks the navButton active
  window.renderFlocklerEmbed = function (contentType, navButton) {
    var config = window.flcklr.EmbedConfigs[embedUuid];
    
    if (contentType.length) {
      // Note: Object.assign is not supported on IE11
      config = Object.assign({}, config, { only: contentType });   
    }
    
    destroyFlocklerEmbed(embedUuid);
   
    embed = window.flcklr.Embeds.create(config);
    
    if (navButton) {
      document.querySelector('.flockler-embed-nav button.active').classList.remove('active');
      navButton.classList.add('active');  
    }
  }
  
  // Destroys and empties the container for the current embed
  window.destroyFlocklerEmbed = function () {
    if (embed) {
      embed.destroy();
      embed = null;
      document.querySelector('#flockler-embed-' + embedUuid).innerHTML = '';
    }
  }
  
  // Let’s wait until all JS assets have been loaded
  interval = window.setInterval(function() {
    if (window.flcklr && window.flcklr.Embeds) {
      window.clearInterval(interval);
      window.renderFlocklerEmbed('');
    }
  }, 200);  
})();


   
              
            
!
999px

Console