• bixroger

    (@bixroger)


    I should only start the preloader once per session, can I apply this function? thanks

    <script type="text/javascript">
    $(document).ready(function() {
        $(window).load(function() {
            function Preloader() {
                var preloader = $ ('.loader');
                preloader.delay(1000) .fadeOut (500);
                var preloader = $('.preloader');
                preloader.delay (1500) .slideUp(500);
            }
            if ( ! sessionStorage.getItem( 'doNotShow' ) ) {
                sessionStorage.setItem( 'doNotShow', 'true' );
                Preloader();
            } else {
               $ ('.loader, .preloader').hide();
            }
        });
    });
    </script>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Run per session’ is closed to new replies.