beforeShow

Fires before the mobile View becomes visible. The event can be prevented by calling the preventDefault method of the event parameter, in case a redirection should happen.

    <div data-role="view" id="foo">
        Go to protected
    </div>


    <div data-role="view" id="protected" data-before-show="redirectBack">
        I am a protected view
    </div>

    <script>
    var app = new kendo.mobile.Application();

    function redirectBack(e) {
        e.preventDefault();
        app.navigate("#foo");
    }
    </script>

Event Data

e.view kendo.mobile.ui.View

The mobile view instance

In this article