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.


                <h2>Magnific Popup: adding Pinterest pin-it button</h2>

<a href="" class="with-caption image-link" title="The caption 1">
  <img src="" width="172" height="105" />  
<a href="" class="with-caption image-link" title="The caption 2">
  <img src="" width="172" height="105" />  

<p>Images from Wikipedia picture of the day.</p>


                .image-link {
  cursor: -webkit-zoom-in;
  cursor: -moz-zoom-in;
  cursor: zoom-in;

/* aligns caption to center */
.mfp-title {
  text-align: center;
  padding: 6px 0;



		type: 'image',
		closeBtnInside: false,
		mainClass: 'mfp-with-zoom mfp-img-mobile',
		image: {
			verticalFit: true,
			titleSrc: function(item) {
        var caption = item.el.attr('title');
        var pinItURL = "";
        // Refer to
        pinItURL += '?url=' + '';
        pinItURL += '&media=' + item.el.attr('href');
        pinItURL += '&description=' + caption;
        return caption + ' &middot; <a class="pin-it" href="'+pinItURL+'" target="_blank"><img src="" /></a>';
    gallery: {
      enabled: true 
    callbacks: {
      open: function() {
        this.wrap.on('click.pinhandler', '.pin-it', function(e) {
          // This part of code doesn't work on CodePen, as it blocks
          // Uncomment it on your production site, it opens a window via JavaScript, instead of new page
          /*, "intent", "scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,left=" + (window.screen ? Math.round(screen.width / 2 - 275) : 50) + ",top=" + 100);

          return false;*/
      beforeClose: function() {