beforeOpen

Fires before the ModalView is shown. calling preventDefault on the event argument will cancel the open.

Example

<div data-role="view">
    <a data-role="button" href="#foo" data-rel="modalview">Foo</a>
</div>

<div data-role="modalview" id="foo" data-before-open="preventOpen">
    Foo
</div>

<script>
function preventOpen(e) {
    e.preventDefault();
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(e.target); // <a href="#foo" ...
}

new kendo.mobile.Application();
</script>

Event Data

e.target jQuery

The invocation target of the ModalView.

In this article