We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set Selected Tab in JavaScript

Thread ID:





119741 Jul 27,2015 04:38 PM UTC Jul 29,2015 04:11 AM UTC JavaScript 3
Tags: ejTab
Asked On July 27, 2015 04:38 PM UTC

I want change the selected tab using javascript


<div id="tabPeople" style="display: none">
                            <li><a rel='nofollow' href="#admins">Admins</a></li>
                            <li><a rel='nofollow' href="#doc">Doctors</a></li>
                            <li><a rel='nofollow' href="#teachers">Teachers</a></li>
                        <div id="admins"></div>
                        <div id="admins"></div>
                        <div id="admins"></div>

Sasikala Nagarajan [Syncfusion]
Replied On July 28, 2015 11:51 AM UTC

Hi Vicente,
Thanks for using Syncfusion products,

I want to change the selected tab using javascript

We can achieve your requirement using our existing property selectedItemIndex. This API is used to set the active header based on the given index value.

Please refer the below code snippet to set the selected Item Index during Initialization.


$(function () {

// declaration


Also, we can change the selected Item Index after initializing the tab control. We can achieve this using object of tab control. Please refer the below code snippet to set selected Item Index using object of the tab control.



tabObj = $("#tabPeople").data("ejTab");

We have prepared the sample based on this. Please check with the below link


Also please refer the below link to know more about controls and its available properties ,methods and events.


Please check with the given links and let us know if you need any further assistance.

Sasikala Nagarajan

Replied On July 28, 2015 07:24 PM UTC

Thanks!, it works. You're a legend.


Sasikala Nagarajan [Syncfusion]
Replied On July 29, 2015 04:11 AM UTC

Hi Vicente,
Thanks for the update,
Please get back to us if you need any further assistance,
Sasikala Nagarajan


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon