Esc key

14 views
Skip to first unread message

Borja Riesgo Juan

unread,
Sep 14, 2015, 6:44:38 AM9/14/15
to slimbox...@googlegroups.com
Hello
 I'd like to go the previous page of the browser when you press the key esc.


i found this code:

  function close() {
    if (activeImage >= 0) {
      stop();
      activeImage = prevImage = nextImage = -1;
      center.style.display = "none";
      fxOverlay.cancel().chain(setup).start(0);
    }

    return false;
  }



i have done the same with closelinks:


"a#lbCloseLink[onclick='javascript:window.history.go(-1);' ]"


how can i do that?


Un saludo

Borja Riesgo

Borja Riesgo Juan

unread,
Oct 13, 2015, 5:57:20 AM10/13/15
to Slimbox, borja...@gmail.com
Anyone can help ? mut I write sth like this:


function close() {
    if (activeImage >= 0) {
      stop();
      activeImage = prevImage = nextImage = -1;
      center.style.display = "none";    
      window.history.go(-1);
    }

    return false;
  }
Reply all
Reply to author
Forward
0 new messages