title: multiple classes on "document.querySelector "
body: <p>Please help, I still learn about JS.</p>
  <p>How to add multiple class when I've situation like this?
  I've two trigger .m-trigger and d-trigger</p>
  <pre><code>var ModalEffects = (function() {
  
  function init() {
  
      var overlay = document.querySelector( '.md-overlay' );
  
      [].slice.call( document.querySelectorAll( '.d-trigger' ) ).forEach( function( el, i ) {
  
          var modal = document.querySelector( '#' + el.getAttribute( 'data-modal' ) ),
              close = modal.querySelector( '.md-close' );
  
          function removeModal( hasPerspective ) {
              classie.remove( modal, 'md-show' );
  
              if( hasPerspective ) {
                  classie.remove( document.documentElement, 'md-perspective' );
              }
          }
  
          function removeModalHandler() {
              removeModal( classie.has( el, 'md-setperspective' ) ); 
          }
  
          el.addEventListener( 'click', function( ev ) {
              classie.add( modal, 'md-show' );
              overlay.removeEventListener( 'click', removeModalHandler );
              overlay.addEventListener( 'click', removeModalHandler );
  
              if( classie.has( el, 'md-setperspective' ) ) {
                  setTimeout( function() {
                      classie.add( document.documentElement, 'md-perspective' );
                  }, 25 );
              }
          });
  
          close.addEventListener( 'click', function( ev ) {
              ev.stopPropagation();
              removeModalHandler();
          });
  
      } );
  
  }
  
  init();
  </code></pre>
  <p>I tried to add like this</p>
  <pre><code>document.querySelectorAll( '.d-trigger.m-trigger' )
  </code></pre>
  <p>and</p>
  <pre><code>document.querySelectorAll( '.d-trigger' '.m-trigger' )
  </code></pre>
  <p>the modal doesn't work correctly, the first code make any trigger doesn't work, and the second code only work on first class.</p>
  <p>I've solution for this, just copy all code and change the class. but any solution for this?</p>