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

Multiple selects on tabstrip using JS

3 Answers 79 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Iram
Top achievements
Rank 2
Iram asked on 07 Oct 2015, 11:05 AM

Hello,

 We have a tabstrip control that is already initialized and we are referencing that using : $("#tabstrip").data("kendoTabStrip"). We would like to perform multiple selects on different tabs one after the other:

 Here is the Dojo for that.

http://dojo.telerik.com/iJOGe/24

If we set the animation to false, it works but since the tabstrip is already initialized we would like to perform a second select after the animation is completed or remove the animation from the tabstrip component completely. We do not intend to use a timeout. Is there a way we can achieve this?

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 07 Oct 2015, 01:31 PM
Hello Iram,

I am not sure that I understand the use case for selecting different tabs in such manner, but the easiest way for achieving this would be by disabling the animation:
var tabStrip = $("#tabstrip").kendoTabStrip({
  animation: false
}).data("kendoTabStrip");

However, if you want to keep the animation and change the selected tab after the previous one is selected, you should handle the activate event, but  with some custom logic for preventing the logic to be executed on each tab change:
Hope this helps.


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Iram
Top achievements
Rank 2
answered on 07 Oct 2015, 01:36 PM

Hello @Konstantin Dikov,

 Thanks for the answer, however I do not want to reinitialize the TabStrip control as I do not have control over the initializing of the tabStrip control, its already done server-side. All I can do now is get a reference to that control and manipulate it client side. Is there a way I can achieve the animation: false and selection of the second tab using a control that has already been initialized? Kindly let me know.

 

Cheers.

0
Konstantin Dikov
Telerik team
answered on 09 Oct 2015, 10:27 AM
Hi Iram,

Can you please elaborate why you need to disable the animation on client-side and not when you initialize the control in the first place?

Currently, the only thing that I could suggest without re-initialization of the widget would be to try the following:
tabStrip.options.animation.open.duration = 0;
tabStrip.options.animation.open.effects = "none";
tabStrip.options.animation.close.duration = 0;
tabStrip.options.animation.close.effects = "none";


Regards,
Konstantin Dikov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TabStrip
Asked by
Iram
Top achievements
Rank 2
Answers by
Konstantin Dikov
Telerik team
Iram
Top achievements
Rank 2
Share this question
or