ericakfranz
11/24/2015 - 3:58 PM

Assign the escape key to exit an optin. ikhc6rkql15ly9mx = optin's slug

Assign the escape key to exit an optin. ikhc6rkql15ly9mx = optin's slug

$(document).keyup(function(e) {
    if (e.keyCode == 27) { // escape key maps to keycode `27`
    if( typeof window.ikhc6rkql15ly9mx !=='undefined') {
      window.ikhc6rkql15ly9mx.close(true);
    }
  }
});