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

documentation bug or question

1 Answer 33 Views
Window
This is a migrated thread and some comments may be shown as answers.
Piyush Bhatt
Top achievements
Rank 1
Piyush Bhatt asked on 01 Jun 2016, 02:57 PM

On this page - there is code to close the window as below.

http://docs.telerik.com/kendo-ui/controls/layout/window/how-to/add-close-button

  $(".close-button").click(function(){// call 'close' method on nearest kendoWindow $(this).closest("[data-role=window]").kendoWindow("close");});

 

Question - is kendoWindow("close") a proper call? or data("kendoWindow").close() would be right way to code here? This is in your documentation so making sure what is suggested approach.

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 03 Jun 2016, 07:39 AM

Hello Piyush Bhatt,

Yes, the two calls are internally equivalent, but we generally recommend the usage of

data("kendoWindow").close()

Thank you for pointing this example. We will modify it to use this type of invocation to remove the confusion.

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