Friday, June 19, 2015

The difference between return false; and e.preventDefault();

function() {
  return false;
}

// IS EQUAL TO

function(e) {
  e.preventDefault();
  e.stopPropagation();
}

No comments: