0

I've got this script to have a pop-up appear 5 seconds into the page. However, how can I stop it popping up everytime a user goes on to that page as it gets annoying.

jQuery(function($) {
    // Load dialog on page load
    setTimeout(function() {
        $('#basic-modal-content').modal({
            position: ["22%"]
        });

        // Load dialog on click
        $('.salesSlider .basic').click(function(e) {
            var content = '#' + this.id + '-content';
            $(content).modal();

            return false;
        });
    }, 5000);
});​

Could someone please point me to the right direction.

gdoron
  • 147,333
  • 58
  • 291
  • 367
  • 1
    What are you asking about? Do you know how to set and read cookies? – gdoron May 05 '12 at 21:39
  • I know I have to reference the cookie.js file, but I do not know how to apply the cookie to this script so the 'basic-modal-content'(which is the pop-up) only appears once per session. – user1377335 May 07 '12 at 17:14

0 Answers0