modal.js
function bindToClick(selector, handler) {
    var elems = document.querySelectorAll(selector);
    var i = -1;
    var len = elems.length;
    while (++i < len) {
      elems[i].addEventListener('click', handler);
    }
  }
function bindToClick(selector, handler) {
    var elems = document.querySelectorAll(selector);
    var i = -1;
    var len = elems.length;
    while (++i < len) {
      elems[i].addEventListener('click', handler);
    }
  }
function bindToClick ( selector , handler ) { var elems = document . querySelectorAll ( selector ) ; var i = - 1 ; var len = elems . length ; while ( ++ i < len ) { elems [ i ] . addEventListener ( 'click' , handler ) ; } }
Binds the given `handler` to all elements that match the `selector`.
Binds the given handler to all elements that match the selector .