Hi Bernard,
You can use Selecting and Selected event to achieve your requirement.
<ejs-tab id="defaultTab" Selected="tabSelected" Selecting="tabSelecting"> <e-tab-tabitems> <e-tab-tabitem header="ViewBag.headerTextOne" content="@contentOne"></e-tab-tabitem> <e-tab-tabitem header="ViewBag.headerTextTwo" content="@contentTwo"></e-tab-tabitem> <e-tab-tabitem header="ViewBag.headerTextThree" content="@contentThree"></e-tab-tabitem> </e-tab-tabitems> </ejs-tab>
<script type="text/javascript">
function tabSelected(args) { if (args.selectedIndex === 1) { // You can call javascript function } } function tabSelecting(args) { if (args.selectingIndex === 1) { // You can call javascript function } } </script> |
Kindly try the attached sample and let us know if this meets your requirement.
Regards,
Satheesh Kumar B
Attachment:
AspCoreTab_d7eff2f7.zip