Bootstrap-session-timeout

سفارشی Callback


Shows an example of using custom callback functions for warning و redirect.

Session وضعیت:

             تومان .sessionزمانout({
                keepAliveUrl: 'keep-alive.html',
                logoutUrl: 'login.html',
                warnAfter: 3000,
                redirAfter: 20000,
                onStart: function () {
                     تومان ('.jumbotron').css('background', '#398439').find('p').addClass('hidden');
                     تومان ('#fine').removeClass('hidden')
                },
                onWarn: function () {
                     تومان ('.jumbotron').css('background', '#b92c28').find('p').addClass('hidden');
                     تومان ('#warn').removeClass('hidden')
                },
                onRedir: function (opt) {
                    window.location = opt.logoutUrl;
                }
            });
        
برگشت to دمو Index
تومان