jQuery UI Widgets › Forums › General Discussions › Navigation › Tabs › Query regarding Tab
Tagged: Tabs Widget
This topic contains 3 replies, has 2 voices, and was last updated by Apeksha Singh 12 years, 10 months ago.
-
AuthorQuery regarding Tab Posts
-
Hi,
I am using tabs in my project for navigation , but now the requirement has changed and I don’t want tab caching i.e., every time I click a tab I want it to get refresh and display the first view rather than showing the view where I have left it before.
Also I am using jquery-1.8.2.min.js and jQWidgets v2.6.1 Release for my project.Please guide me regarding this issue.
Thanks & Regards,
Apeksha
Hi,
I suppose that you initialize the widgets by using the “initTabContent” callback which is called when a Tab’s content is initialized i.e that happens once. If you want to create some content dynamically, I suppose that you can use the “tabclick” event and initialize the dynamic content in the event handler.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter Stoev,
Thanks a lott for replying ‘tabclick’ event has resolved my issue.
Thanks & Regards,
ApekshaHi Peter,
I have used the following code to display different views on tabclick event.
$('#main_tabs').jqxTabs({ width: '100%',autoheight:true,keyboardNavigation: false, position: 'top', theme: 'ui-start' }); $('#main_tabs').on('tabclick', function (event) { var clickedItem = $('#main_tabs').jqxTabs('getTitleAt', event.args.item); switch (clickedItem) { case "Home": self.goToPage('display_main_dashboard'); break; case "Accounts": self.goToPage('display_main_accounts'); break; case "Reports": self.goToPage('display_main_reports'); break; case "Contacts": self.goToPage('display_main_contacts'); break; case "Settings": self.goToPage('display_main_settings'); break; } });
It is fulfilling my requirement but creating an issue i.e., Every other tabs inside this tab is going to this pages in respect of their index.
I have used string here but then too its creating conflict .Please reply me as soon as possible.
Thanks & Regards,
Apeksha -
AuthorPosts
You must be logged in to reply to this topic.