offset
offset

Reputation: 1407

kendo ui data-show not work

I'm work with kendo ui at html5, and I need some action happen each time the page is displayed. Just for that is the "data-show" option, but it not work. The function fire only at the first time and no more.

<div id="div1" data-role="view" data-show="alert(999)">
    // The content of the div
</div>

The alert fire only one time. Any Idea? Thanks.

Upvotes: 3

Views: 1021

Answers (1)

Atanas Korchev
Atanas Korchev

Reputation: 30661

Try creating a JavaScript function which will handle the show event:

<div id="div1" data-role="view" data-show="div1Show">
</div>

<script>
function div1Show() {
  alert(999);
}
</script>

Here is a short demo demonstrating the same: http://jsbin.com/abaveh/1/edit

Upvotes: 1

Related Questions