This is a migrated thread and some comments may be shown as answers.

Closing a kendo ui mobile view

1 Answer 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tunde
Top achievements
Rank 1
Tunde asked on 16 Jul 2013, 11:55 AM
How can i close a kendo ui mobile view and also unload all its content. This view contains a youtube video that needs to be stopped / unload once a user click on the back button at the top of the view or on android using the physical back button on the device?Here is the code to my view, but i can't seems to get the view to close. When i use the back button the view goes away but it content does not unload.


<div data-role="view" id="showpostlayout" data-layout="defaultlayout" data-reload="true">
<div data-role="header">
    <div data-role="navbar"><a data-click="closePost" data-role="button" data-align="right">Close</a> </div>
  </div>      
  <div id="mypost">
 
 </div>
</div>
 
 
 
        <script>
         function closePost() {
 
             $("#showpostlayout").kendoMobileModalView("close");
 
        }  
        </script>

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 18 Jul 2013, 05:44 AM
Hello,

 The behavior you observe is by default - closing the modalview hides its element. In case you want to remove certain content from an widget, you can use the jQuery manipulation methods (for example, remove). 

Since our 2013 Q2 release, you can also opt to destroy the modalview widget, which will remove its contents, too. 

Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Tunde
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or