EasyUI Forum

General Category => General Discussion => Topic started by: enber79 on May 02, 2016, 10:28:13 AM



Title: Trouble Selecting Tab
Post by: enber79 on May 02, 2016, 10:28:13 AM
Hi all. I have two functions, both triggered on click a link. Both must select a tab, usually I select tab by index. In first function this works perfectly. But the second is not working, with same syntax:

$('#docs_tab').tabs('select', 0);


¿Anyone knows why this method can fail selecting a tab? ¿Any alternative way to acomplish same funcionality?

Thanks


Title: Re: Trouble Selecting Tab
Post by: Pierre on May 02, 2016, 12:59:19 PM
Such code should work. You can check with F12 for errors.


Title: Re: Trouble Selecting Tab
Post by: enber79 on May 02, 2016, 11:42:32 PM
Console does not show any error. The call to select tab method is inside a IF. That condition is true, I have set a console.log string to show this. But swap to tab index 1 is not working. Don't know where is the problem.


Title: Re: Trouble Selecting Tab
Post by: Pierre on May 03, 2016, 12:52:39 AM
Can you post your IF code? There must be some error.


Title: Re: Trouble Selecting Tab
Post by: Max Lamda on May 03, 2016, 01:04:35 AM
Is the tab enabled?


Title: Re: Trouble Selecting Tab
Post by: enber79 on May 04, 2016, 10:26:54 AM
I have rewrite the function and is working now as expected. Thanks.