init and show events of the View widget
The Kendo UI Mobile View widget exposes two important events: init
and show
. Event handlers for these events can be wired using data attributes as shown:
<div data-role="view" data-init="onInitialize" data-show="onShow"> </div> <script> var app = new kendo.mobile.Application(document.body); function onInitialize(e) { alert('view initialized'); } function onShow(e) { alert('view shown'); } </script>
Tip
Try it in jsFiddle: http://jsfiddle.net/kendomobile/vWC39/
The init
event is fired first and only once, after the View and its child widgets are initialized. The show
event is fired whenever the view becomes visible. The init
event is designed to be used for actions which should be done only once during the ...
Get Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.