jquery-ui-tabs

Loading JSON-encoded AJAX content into jQuery UI tabs

天大地大妈咪最大 提交于 2019-12-03 12:55:31
We want all of our AJAX calls in our web app to receive JSON-encoded content. In most places this is already done (e.g. in modals) and works fine. However, when using jQueryUI's tabs ( http://jqueryui.com/demos/tabs/ ) and their ajax functionality, only plaintext HTML can be returned (i.e. from the URLs specified in the a tags below). How do I get the tab function to recognize that on each tab's click, it will be receiving JSON-encoded data from the specified URL, and to load in the .content index of that JSON? $(function() { $('div#myTabs').tabs(); }); <div id="mytabs" class="ui-tabs ui

is it possible to use Tabs without using anchor tag and id?

白昼怎懂夜的黑 提交于 2019-12-03 08:24:18
i would like to generate dynamic tabs. so anchor tags will not have id also div tags wont have id. this is what i try to do but it doesn't work. <script> $(function () { $("#tabs").tabs(); $("#tabs ul.super li a").each(function (index) { $(this).click(function () { $("#tabs").tabs("select", index); }); }); }); </script> <div id="tabs"> <ul class="super"> <li><a>title 1</a></li> <li><a>title 2 </a></li> </ul> <div> content1 </div> <div> content2 </div> </div> How can i make it work like that? It is workind code. Dynamicaly add tab's and a's <div id="tabs"> <ul class="super"> <li><a>title 1</a><

Opening JQuery tabs with URL, and adding a hash to URL on tab click

牧云@^-^@ 提交于 2019-12-03 07:11:55
I'm working on a web application, and I am using the JQuery UI Tabs plugin to separate the data. If I mouse over each one of the tabs, on the lower left of the screen I can see the URL of that tab (ex: testPage.com/#tab1 or testPage.com/#tab2) Now, if I type in one of those addresses into the URL bar, I do not go to the tab related to the hash in the URL, but instead I go to the first tab in the application. My question is: How would I go about anchoring a specific tab to a URL? So if someone goes to testPage.com/#tab3, They will end up in tab 3 on the application. I am doing this also because

Jquery UI - reload selected tab?

大憨熊 提交于 2019-12-03 03:24:28
Is there a way to reload the selected tab I know there is the .load() function. But it wants a tab index and I don't seem to see a way to grab the selected tabs id. Simen Echholt Update: In jQuery 1.9, the selected option is renamed to active . See attomman's answer. To get the currently selected index, use the tabs('option','selected') function. E.g, if you have a button #button (and the #tabs element is made into tabs) where you want to get the index, do the following: $("#button").click(function() { var current_index = $("#tabs").tabs("option","selected"); }); Here's a demo: http://jsfiddle

How to add the id to dynamically created jquery tab

三世轮回 提交于 2019-12-02 09:09:33
I am creating dynamically jQuery tabs. I want to assign the id to each tab. $("#addTab").live('click', function() { index++; var title = 'Tab..... ' + index; var url = '#fragment-' + index; addTab(url, title, index); $('li[class=ui-state-default]').id(this)=1; // this line to add id }); but id is not assigning to the tab.. JS Fiddle $('li.ui-state-default:last').attr('id', 'some_' + index); // only Numeric id not allowed DEMO NOTE: $('li.ui-state-default').attr('id', 'some_' + index); was change all li's id have class ui-state-default , but current code will only change the last one's id. $(

jQuery ui tabs load/tabsload event does not fire

人走茶凉 提交于 2019-12-02 07:13:43
问题 This seems to be the same as my question: jquery ui tabs load event does not fire but the solution provided doesn't work for me. my code: <script type="text/javascript"> $(document).ready(function(){ $( "#tabs" ).bind( "tabsload", function(event, ui) { alert("ok"); changeheight(); }); $("#tabs").tabs({ load: function(event, ui){ alert("load"); changeheight();}, cache: true}); }); function changeheight(){ alert("changeheight"); var iframe = document.getElementById("#iframe1"); var htmlheight =

Uncaught Invalid dimensions for plot, width = null, height = null for flot charts api

给你一囗甜甜゛ 提交于 2019-12-02 06:24:39
问题 I am using flot charts API for showing the graphs and I am successful in plotting the data. I am loading around 30 charts in one page and I am rendering them in ui-tabs.All the graphs are rendered perfectly and page is working fine.But still I am getting this error. I have used different div ids to all the graphs,height and width is given to all the divs. I am not able to find the solution since yesterday.I have included all the js required for the flot in the central page. Please help me in

Nested jQuery tabs

余生长醉 提交于 2019-12-02 05:22:55
问题 I'm new to jQuery (a couple of weeks). I'm trying to nest the jQueryUI tab control. It works fine until the nested tabs are in an external file then I get an exception thrown in the jQuery source. This seems to be a timing issue to a certain extent, because if I place alert boxes in the .ready function of the nested tabs it works. Can anyone help? I'm sure this question must have been asked before, but after hours of searching I can't seem to find a solution. Here's my very simple example...

Nested jQuery tabs

拜拜、爱过 提交于 2019-12-02 02:43:11
I'm new to jQuery (a couple of weeks). I'm trying to nest the jQueryUI tab control. It works fine until the nested tabs are in an external file then I get an exception thrown in the jQuery source. This seems to be a timing issue to a certain extent, because if I place alert boxes in the .ready function of the nested tabs it works. Can anyone help? I'm sure this question must have been asked before, but after hours of searching I can't seem to find a solution. Here's my very simple example... Outer Tab <head id="Head1" runat="server"> <title></title> <link type="text/css" href="css/jquery-ui-1

Manually activate tabs jquery ui 1.10.3

别等时光非礼了梦想. 提交于 2019-12-01 23:42:07
问题 I am really getting mad, I searched through jquery ui doc and stackoverflow's questions (tons of questions) but I cannot figure out how to manually activate tabs ( .tabs() ) in jquery 1.10+ . I founded and tried this solution : $(mytabs).tabs("option", "active", index); but it does not seem to work out. Can someone help me to know how to activate a tab , e.g. when I create a new one? I can't figure out how jQuery UI has no longer the select event that , as I could know, accomplished this goal