Get a reference to the current view.


<div data-role="view" id="foo">
    <a id="button" data-role="button" data-click="logCurrentView">I am a mobile button</a>

    var app = new;
    function logCurrentView() {
/* The result can be observed in the DevTools(F12) console of the browser. */
        console.log(app.view()); // the foo mobile view instance

Returns the view instance.

In this article
Not finding the help you need? Improve this article