Posted By

jacobpdq on 05/21/10


Tagged

cross-browser preventDefault preventevent ie8safepreventevent


Versions (?)

PreventDefault


 / Published in: JavaScript
 

URL: http://stackoverflow.com/questions/1000597/event-preventdefault-function-not-working-in-ie-any-help

ie8SafePreventEvent(e);

  1. function ie8SafePreventEvent(e){
  2. if(e.preventDefault){ e.preventDefault()}
  3. else{e.stop()};
  4.  
  5. e.returnValue = false;
  6. e.stopPropagation();
  7. }

Report this snippet  

You need to login to post a comment.