title: Multiple Modal Dialogs
body: <p>I am trying to use multiple modals from this tutorial:
  <a href="http://tympanus.net/codrops/2014/12/08/inspiration-dialog-effects/" rel="nofollow">http://tympanus.net/codrops/2014/12/08/inspiration-dialog-effects/</a></p>
  
  <p>If you scroll down to the comments section you will see that Pedro Botelho posted a solution to this but  his solution isn't working for me and he hasn't replied yet with a solution.</p>
  
  <p>Does anyone see any issues with his solution? When I click the links for bth modals nothing happens.</p>
  
  <pre><code>&lt;div class="button-wrap"&gt;&lt;button data-dialog="somedialog-1" class="trigger"&gt;Open Dialog&lt;/button&gt;&lt;/div&gt;
  &lt;div class="button-wrap"&gt;&lt;button data-dialog="somedialog-2" class="trigger"&gt;Open Dialog&lt;/button&gt;&lt;/div&gt;
  
  &lt;div id="somedialog-1" class="dialog"&gt;
      &lt;div class="dialog__overlay"&gt;&lt;/div&gt;
      &lt;div class="dialog__content"&gt;
          &lt;h2&gt;&lt;strong&gt;Howdy&lt;/strong&gt;, I'm a dialog box&lt;/h2&gt;&lt;div&gt;&lt;button class="action" data-dialog-close&gt;Close&lt;/button&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="somedialog-2" class="dialog"&gt;
      &lt;div class="dialog__overlay"&gt;&lt;/div&gt;
      &lt;div class="dialog__content"&gt;
          &lt;h2&gt;&lt;strong&gt;Howdy&lt;/strong&gt;, I'm another dialog box&lt;/h2&gt;&lt;div&gt;&lt;button class="action" data-dialog-close&gt;Close&lt;/button&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  (function() {
  
      [].slice.call( document.querySelectorAll( '[data-dialog]' ) ).forEach( function( trigger ) {
          var dlg = new DialogFx( document.getElementById( trigger.getAttribute( 'data-dialog' ) ) );
  
          trigger.addEventListener( 'click', dlg.toggle.bind(dlg) );
      } );
  
  })();
  </code></pre>