jQuery tabs with both Ajax and static div's -
I am posting form data on a page that is using the jQuery tab because you post data to ajax query (With at least one ton of extra work and making it unsafe), I'm loading the active tab as the actual device on the page.
& lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('# tab'). Tab ({selected: 3});}); & Lt; / Script & gt; & Lt; Div id = "tabs" style = "margin-top: 10px" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "myprofile.php" & gt; My profile & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "mycompany.php" & gt; My company & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "manageusers.php" & gt; Manage users & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#management" & gt; Manage all users & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "manageclients.php" & gt; Manage Customers & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Div id = "manageallusers" & gt; & Lt; / Div & gt; & Lt; / Div & gt;
In the above example, all tabs except the "Manage All Users" tab are called through the Ajax method in the Jezeb tab function. The second page already has a stable division. At initial load, it works beautifully, however, if you start clicking through the Ajax tab, then the stable division remains below.
The tab () function has a 'load' callback. I know I should use it - I'm not just making sure how to contact it. Any ideas, suggestions ??
$ ("# tab"). Tab ({load: function (ui) {$ ("#management"). Hide ();}});
This is what you were trying to hide it. Whatever you want to do, you can swap it clearly, because you were not very specific about it.
Comments
Post a Comment