cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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. 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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


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.

              <h2>fancyBox v3.1 - Content filter</h2>

  Custom click handler to open fancyBox manually from only visible links  - 
  <select id="filter">
    <option value=""></option>
    <option value="one">One</option>
    <option value="two">Two</option>
    <option value="three">Three</option>

<p class="imglist">
  <a class="one three" href="https://farm4.staticflickr.com/3953/15594397982_477385f90d_b_d.jpg" data-fancybox="filter">
    <img src="https://farm4.staticflickr.com/3953/15594397982_477385f90d_m_d.jpg" />

  <a class="two" href="https://c1.staticflickr.com/9/8148/29324593462_abebaddc38_k.jpg" data-fancybox="filter">
    <img src="https://c1.staticflickr.com/9/8148/29324593462_f890687b7a_m.jpg" />

  <a class="two three" href="https://c2.staticflickr.com/6/5499/30972532232_051e1dc57e_h.jpg" data-fancybox="filter">
    <img src="https://c2.staticflickr.com/6/5499/30972532232_e9a298a0c5_m.jpg" />

  <a class="three" href="https://farm1.staticflickr.com/560/31434966252_8e1bc946da_b_d.jpg" data-fancybox="filter">
    <img src="https://farm1.staticflickr.com/560/31434966252_8e1bc946da_m_d.jpg" />
              .imglist {
  background: #eee;
  padding: 20px;
              /* Show/hide selected links */

$('#filter').on('change', function() {
  var $visible, val = this.value;
  if (val) {
    $visible = $('[data-fancybox="filter"]').hide().filter('.' + val);
  } else {
    $visible = $('[data-fancybox="filter"]');

// Init fancyBox
  selector : '[data-fancybox="filter"]:visible',
  thumbs   : {
    autoStart : true
Loading ..................