-
AuthorPosts
-
May 19, 2015 at 4:04 pm #277260
Hello,
I have a Button in the content of a tab-nav tab and I want to change the active tab when this button is clicked. The Button’s Id is ‘chooseImage’ so i tried using the following custom javascript custom code to achieve this:
$(document).on('click', "#chooseImage", function(){ $('.x-nav-tabs-item a')[1].click(); });
I have an Issue here, the active Tab is now the one i want it to be, but the content displayed is still the one of the former active Tab. I appreciate your help.
You can see the Issue on my page here. It’s the button on the left column in the first tab.
Greets,
ChristophMay 19, 2015 at 4:18 pm #277271Sorry, was a silly Bug. SOLVED!
It works just as described above.May 19, 2015 at 9:33 pm #277391Hello Christoph,
Glad that this is working now.
Let us know if you have questions in the future.Thanks.
June 4, 2015 at 7:25 am #292432Hello,
I have one more question, is there any event fired when the tab is changed? I want to draw on a canvas when the tab is changed but I can’t find a way to execute some code right when the tab changed.
Thanks.
June 4, 2015 at 7:36 pm #292998Hello There,
You can check the tab if it has the
active
class. You can try this code:(function($){ if ( $('#tab-ID').hasClass('active') ) { //do something here } })(jQuery);
Please let us know if this works out for you.
-
AuthorPosts