Grow your CSS skills. Land your dream job.

How to remove a lightbox when the back button is clicked

  • # May 7, 2013 at 4:37 pm

    Hi Javascript masters,

    I’m working on a new website, and i have some issues with the lightbox.
    When i click on a project, an overlay div is displayed.

    When I click on the close button, the overlay div is properly removed,
    I would like to apply the same effect when the browser previous button is clicked (for firefox and chrome).

    Can someone help me please !

    here is the beta website : http://emalsaifi.com/purprodv4/productions.php

    Emal

    # May 7, 2013 at 7:28 pm

    By “previous button” are you referring to the browser’s back button that takes you back to the previous visited link?

    # May 7, 2013 at 7:33 pm

    Hi Jarolin,

    Indeed, i’m looking to detect the browser back button,
    and to redirect the user to productions.php page ;)

    # May 7, 2013 at 7:47 pm

    You can’t do that directly, but I found a workaround: http://www.webdesignerdepot.com/2013/03/how-to-manage-the-back-button-with-javascript/

    # May 9, 2013 at 8:15 pm

    Hi CrocoDillon,

    Sorry for my late reply, thank you for the link
    i’ll try it this w.e, and i’ll keep you posted :)

    Cheers

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".