text: 
  var elems = document.getElementsByClassName('confirm');
  var confirmIt = function (e) {
      if (!confirm('Are you sure?')) e.preventDefault();
  };
  for (var i = 0, l = elems.length; i < l; i++) {
      elems[i].addEventListener('click', confirmIt, false);
  }