How do I limit a simple jqModal Pop-Up to show only once per session?

I have a pop-up that is working well for me except that it reloads each time the user navigates back to the home page.  I need to insert a script that will hide the pop-up until the next session, but don't know how.

My code:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="/Promotions/scripts/jqModal.js"></script>
 
<style type="text/css">
.jqmWindow {
    display: none;
    position: fixed;
    top: 20%;
    left: 50%;
    margin-left: -300px;
    width: 600px;
            /*width: auto;*/
    /* background-color:#777777; */
    color: #333;
    /* border: 1px solid black; */
    padding: 0px;
}
.jqmOverlay { background-color: #000; }
* html .jqmWindow {
     position: absolute;
     top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');
}
</style>

<script type="text/javascript">
    $(document).ready(function() {
        $('#rename').jqm();
        $('#rename').jqmShow();
    });
</script>
<!-- POP-UP DIV -->
<DIV class="jqmWindow" id="rename" style="padding:0px;">
<a href="#" class="jqmClose"><img src="/Promotions/images/vaticani-splash.png" width="600" height="400" border="0"></a>
</div>
dcayceAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Leonidas DosasCommented:
I made the following code using the sessionStorage.

 $(document).ready(function() {   
     
      
     var a=sessionStorage.getItem('dataElement');
     
     if(a===null || a===undefined){
     $('#rename').jqm();    
     $('#rename').jqmShow();
     }
    
    sessionStorage.dataElement='modal';   
    
    
    });

Open in new window

1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dcayceAuthor Commented:
Leonidas;

You are my hero!  Thank you so much!

http://www.paulistpress.com/

Cayce
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.