jquery-ui-tabs

jQuery UI ajax tabs - requests multiplying when loading links within tabs

心不动则不痛 提交于 2019-12-01 13:08:58
问题 I'm using jQuery UI tabs, loading the tab content via ajax. Content may contain links which I want to load within the selected tab. To achieve that, I use this code $("#tab-div").tabs({ load: function(event, ui) { $('a:not('.targetBlank'), ui.panel).live('click', function() { $(ui.panel).load(this.href); return false; }); }); I use live() so that the links loaded after the initial load are also covered. Now, imagine a situation where you have 2 tabs. First, the user is in tab_a, which

Maintaining jQuery-ui previous active tab (before reload) on page reload

拟墨画扇 提交于 2019-12-01 12:04:46
I have a jquery-ui tab component with two tabs. <div id="tabs"> @Html.Hidden("SelectedTabId") <ul> <li><a href="#Tab-1">Tab1</a></li> <li><a href="#Tab-2">Tab2</a></li> </ul> <div id="Tab-1"> </div> <div id="Tab-2"> </div> </div> When I am in Tab-2, I do some stuff that cause some fields (@Html.TextBoxFor) in tab-2 to be updated programmatically and automatically when some condition occurs. So after it happens (fields updated) the page is reloaded. After page is reloaded, first tab Tab-1 is being active, but I want Tab-2 to be active instead which it was the active before page was reloaded. I

How to know if a tab is enabled on jQuery tabs?

你说的曾经没有我的故事 提交于 2019-12-01 06:17:07
I can't find in the API of jQuery UI Tabs ( http://docs.jquery.com/UI/Tabs ) a method to know if a certain tab is enabled or not, I need that because in an event of my application I want to enable a certain tab only if that tab is disabled. Do you know how can I get that information from the jquery api? Thanks in advance. The disabled option returns an aray of he indexes of the disabled tabs, so a function to check if one's disabled would look like this: function isDisabled(index) { return $.inArray(index, $("#tabs").tabs("option", "disabled")) > -1; } You can give it a try here , this just

Callback after ajax loading a tab

梦想的初衷 提交于 2019-12-01 05:26:49
How can I apply some code to the content of an ajax loaded tab? I tried using $(document).ready inside the loaded content, but that prevented css styles from loading (don't know why). Is there a callback function? Should I use $(document).ready and styles inside the loaded document in some other way? If using $(document).ready inside the loaded document is fine, should I also include references to jquery and its plugins in it? Have you tried the load event ? This should be called, when the contents of the tab have been loaded. In general you shouldn't treat the loaded element as a new page and

Callback after ajax loading a tab

不羁的心 提交于 2019-12-01 03:48:35
问题 How can I apply some code to the content of an ajax loaded tab? I tried using $(document).ready inside the loaded content, but that prevented css styles from loading (don't know why). Is there a callback function? Should I use $(document).ready and styles inside the loaded document in some other way? If using $(document).ready inside the loaded document is fine, should I also include references to jquery and its plugins in it? 回答1: Have you tried the load event? This should be called, when

Jquery UI Tabs: How do i hide a tab and its corresponding div when i close it

为君一笑 提交于 2019-12-01 01:56:38
问题 I have used Jquery UI Tabs, and given close option to the tabs. By default i am creating three tabs and its corresponding three divs. Now when i close a tab then the tab and its div are removed. I need to just hide the tab and div and when i click Add Tab i should just show the hidden tab and div. I am not sure how to show/hide the tab and div property. Thanks in advance. Jeevi 回答1: Based on the discussion at http://old.nabble.com/UI-Tabs:-How-to-hide-show-a-Tab-td19569388s27240.html the

Applying effects to jquery-ui tabs

拟墨画扇 提交于 2019-12-01 01:01:23
Is it possible to apply an effect to a jquery-ui tab, I haven't seen any examples of it, and I'm fairly sure that if it is possible the following is incorrect: <script type="text/javascript"> $(function() { $("#tabs").tabs(); $("#tabs").effect(slide,options,500,callback); }); </script> You can do something like this, if you want the effect to happen when you change tags using the fx option : $(function() { $("#tabs").tabs( { fx: { height: 'toggle' } } ); }); A fade + slide would be like this: $(function() { $("#tabs").tabs( { fx: { height: 'toggle', opacity: 'toggle' } } ); }); This applies

JW Player: cross-browser “display:none” player behavior

放肆的年华 提交于 2019-12-01 00:43:37
Is there a simple, upfront method to have FF and IE treat hidden JW Players the same? I am placing different instances of the player dynamically in jQuery generated tabs. In effect, switching tabs hides the parent div of each player. In FireFox, the tab switch and accompanying "display" change stops the player. This doesn't happen in IE. I would like it to. What is the easiest way to have both browsers act the same? I am hoping for a CSS/HTML solution, either thorough the way the players are embedded or a style rule Otherwise I suppose I will need to add an item listener that compares the

Getting Target URL from jQuery-UI Tabs

跟風遠走 提交于 2019-11-30 22:28:51
I'm working on a project that makes heavy use of jQuery tabs and Ajax. Loading data into the tabs is simplicity itself, but the data in the tabs needs to be filtered by a select box that sits outside the tabs div. Here's where my problem starts. Let's say my tab makes an Ajax call to the URL "tab1.html." jQuery tabs changes this target into a hash value something like "#ui-tabs-10," but I can get the original URL through the following code: $("#tabs").tabs({ select: function(event,ui) { var url = $.data(ui.tab, 'load.tabs'); ...do stuff with url } }); But I cannot seem to access the ui.tab

Applying effects to jquery-ui tabs

…衆ロ難τιáo~ 提交于 2019-11-30 19:54:01
问题 Is it possible to apply an effect to a jquery-ui tab, I haven't seen any examples of it, and I'm fairly sure that if it is possible the following is incorrect: <script type="text/javascript"> $(function() { $("#tabs").tabs(); $("#tabs").effect(slide,options,500,callback); }); </script> 回答1: You can do something like this, if you want the effect to happen when you change tags using the fx option: $(function() { $("#tabs").tabs( { fx: { height: 'toggle' } } ); }); A fade + slide would be like