jQWidgets Forums

jQuery UI Widgets Forums Navigation Tabs Accessing just created tab

This topic contains 2 replies, has 2 voices, and was last updated by  feraudet 13 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Accessing just created tab #2978

    feraudet
    Member

    Hi,

    I can access by id to already html created tabs, but how to access to tabs created with ‘addAt’ to fill it ?

    $(‘#itemtab’).jqxTabs(‘addAt’, ++tabid, title, ‘Loading …’);

    $(‘#itemtab’).bind(‘tabclick’, function (event) {
    var item = 1 + event.args.item;
    var panel = ‘#itemtab-‘ + item;
    $(panel).html(‘new content’);
    });

    Thanks,

    Cyril

    Accessing just created tab #2994

    Peter Stoev
    Keymaster

    Hi Cyril,

    You can add a HTML instead of simple text and get the new element by its ID.

    For example:

    $('#jqxTabs').jqxTabs('addAt',  3, '<div id="newTab">Sample title', '<div id="newContent">Sample content</div>');

    To get the Tab’s content by its ID, use this:

    var newContent = $("#newContent");

    Hope this helps.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Accessing just created tab #2995

    feraudet
    Member

    It sad to do something like this.

    It would be great to have something like $(‘#jqxTabs [tabid=”1″]’).html() …

    Regards,

    Cyril

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

You must be logged in to reply to this topic.