jQWidgets Forums

jQuery UI Widgets Forums Layouts Layout and Docking Layout Selecting a tab in jqxlayout

This topic contains 2 replies, has 2 voices, and was last updated by  NormB 3 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Selecting a tab in jqxlayout #121440

    NormB
    Participant

    I have successfully created a simple layout using jqxlayout with layout as follows

    var layout = [{
    		type: 'layoutGroup',
    		orientation: 'horizontal',
    		items: [{ // LHS
    			type: 'tabbedGroup',
    			width: '40%',
    			items: [{ // LHS - upper
    				type: 'layoutPanel',
    				title: 'Options',
    				contentContainer: 'OptionsPanel',
    				selected: true
    			},
    			{ // LHS - lower
    				type: 'layoutPanel',
    				title: 'ABC',
    				contentContainer: 'AbcPanel'
    			}]
    		},
    		{ // RHS
    			type: 'tabbedGroup',
    			width: '60%',
    			items: [{ // RHS - upper
    				type: 'layoutPanel',
    				title: 'Music',
    				contentContainer: 'MusicDisplayPanel',
    				selected: true
    			},
    			{ // RHS - lower
    				type: 'layoutPanel',
    				title: 'Messages',
    				contentContainer: 'MessagesPanel'
    			}]
    		}]
    	}];
    	$('#jqxLayout').jqxLayout({ theme: 'energyblue', width: '100%', height: 750, layout: layout });
    

    After using the initially selected “Options” Panel, I update the content of the “ABC” panel.

    How can I now make that the new selected tab programatically?

    If I could select the tab I could perhaps trigger a “click” event on it – something like $(“.jqx-ribbon-item[innerHTML=’ABC’]).trigger(‘click’)

    That selector does not work (it may not be legal syntax).

    How can I do it?

    Thanks

    Selecting a tab in jqxlayout #121456

    Martin
    Participant

    Hello NormB,

    You can select the jqxRibbon element using jQuery and call its selectAt method passing the index of the tab you need to select.
    Here is an Example.

    Let us know if you need any further assistance!

    Best Regards,
    Martin Yotov

    jQWidgets team
    https://www.jqwidgets.com

    Selecting a tab in jqxlayout #121457

    NormB
    Participant

    Thank you

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.