Hide image after revisiting page

Hello there,

I#ve got a quick question…

I try to get a code running, but it doesn’t work… I am sure, I messed something up (I am new to Javascript)…

I try to hide an background image, after returning to the page for a second time…

  $(window).load(function () {
    $(function () {
      if (!sessionStorage.getItem("runOnce")) {
        function () {
          $('.et_parallax_bg').css("display", "none");
        sessionStorage.setItem("runOnce", true);

perfect would also be to set a (Date.now()) of 60 Minutes or something, but I am lost…

Any help would be amazing…


I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.


Thank you!
Next time I’m gonna use it as such!