help with tabs

help with tabs

pg_lheltonpg_lhelton Posts: 8Questions: 0Answers: 0
edited June 2012 in General
I am trying to create a table with tabs and i am following the example, but I am getting an error that i dont have a tabs method at this part of the code:

[code]

$("#tabs").tabs({
"show" : function(event, ui) {
var table = $.fn.dataTable.fnTables(true);
if (table.length > 0) {
$(table).dataTable().fnAdjustColumnSizing();
}
}
});

[/code]

what am i missing?
thanks

Replies

  • pg_lheltonpg_lhelton Posts: 8Questions: 0Answers: 0
    this is the specific error im getting:

    Uncaught TypeError: Object [object Object] has no method 'tabs' results.jsp:56
    (anonymous function) results.jsp:56
    f.Callbacks.n jquery-1.7.1.min.js:590
    f.Callbacks.o.fireWith jquery-1.7.1.min.js:635
    e.extend.ready jquery-1.7.1.min.js:388
    c.addEventListener.B
  • Taylor514ceTaylor514ce Posts: 74Questions: 8Answers: 0
    That example is to resize the columns of a Datatable when a JQuery Tab becomes visible. It does NOT "enable tabs". You'll need to reference the JQUERY UI Tab's scripts and/or include them in your markup.
  • pg_lheltonpg_lhelton Posts: 8Questions: 0Answers: 0
    edited June 2012
    ohh ok that makes sense thank you!

    where would I find the lines i need to add to reference those scripts?

    I added this line but it still does not work what else am i missing?
    [code]

    [/code]
  • Taylor514ceTaylor514ce Posts: 74Questions: 8Answers: 0
    I think your first step should be to go to the jquery ui site, and create a simple page that uses tabs.

    http://jqueryui.com/
    http://jqueryui.com/demos/tabs/

    Once you have tabs working, then we could assist you in adding Datatables to your page.
  • pg_lheltonpg_lhelton Posts: 8Questions: 0Answers: 0
    I have the databases showing up correctly and everything else is working the tables just show up beneath each other with the "tab" linking down to the correct table. All i need is for the tables to go behind each other and the tabs to show up correctly.

    and those websites didnt give me the scripting references i needed. I found the same kind of things I have found in other answers on this forum that didnt help my problem.
  • Taylor514ceTaylor514ce Posts: 74Questions: 8Answers: 0
    So, you read and understood the examples on how to use JQuery UI Tabs? You've downloaded the JQuery UI library, and reference it in your own markup? If Datatables are working correctly, but you cannot get Jquery UI tabs to work, then I would suggest you should be posting on the JQuery UI site for assistance.
This discussion has been closed.