jquery-tabs

How to pre-load all tabs by default with jQuery

﹥>﹥吖頭↗ 提交于 2019-12-06 02:52:29
If I have 4 tabs where the first 2 are loaded with ajax and the last 2 are static, how do I pre-load the 2 ajax tabs by default? For the moment, only the first tab is automatically loaded, the second one is loaded when clicked. I want them both to be loaded so that when I click the second one, the content is already loaded. I tried to call the load event on the second tab like this: $(document).ready(function () { $("#main-tabs").tabs({ cache: true }); $("#main-tabs").tabs("load", 1); }); And this loads the second tab, but for some strange reason, the first one doesn't load at all; not even

IE6: select inside jQuery tabs does not render dropdown list

百般思念 提交于 2019-12-05 18:01:29
I have a form inside jQuery tabs; I create tabs in a simple way: $("#tabs").tabs({selected: 1}); The selected index 1 is the tab where form is placed. The problem is, on remote computer with IE6 both selects only display a small blank line instead of list with options when dropdown arrow is clicked: Incorrect dropdown http://queen3.at.tut.by/DropDownIE6jQuery.PNG The options are there in page source, and everything actually works on other machines, in other browsers and also in IE6 (though I use IETester). Everything also works if I remove tabs creation, that is .tabs() - options do appear and

jQuery, multiple tab groups on one page

风流意气都作罢 提交于 2019-12-05 10:58:44
I am using a nice simple tab example from Soh Tanaka. http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery I am trying to put multiple tab groups on the same page yet use the same classes for each tab group. I am making the content for the tabs dynamically, so making new classes for each tab group is out of the question. How do I use the same classes, same jQuery for the different tab groups? I know there is the .each() method available in jQuery, but I am having trouble trying to figure out the correct places to put it in the jQuery. Any help is greatly appreciated. Thanks in advance.

Creating a Next button for switching through jQuery tabs

喜欢而已 提交于 2019-12-04 15:55:25
问题 How can I create a button that will scroll to the next jQuery tab. I want to have a next button within the tabs that will scroll to the next tab, sort of like a step-by-step tutorial. How can this be done? My code so far is below. HTML <div id="tabs"> <ul> <li><a href="#fragment-1"><span>One</span></a></li> <li><a href="#fragment-2"><span>Two</span></a></li> <li><a href="#fragment-3"><span>Three</span></a></li> </ul> <div id="fragment-1"> <p>First tab is active by default:</p> <a href=

Change active tab on button click

别说谁变了你拦得住时间么 提交于 2019-12-04 15:18:34
I have two tabs generated by jquery-ui . I do something in the Tab1 and on a button click, there is an AJAX call which displays the results in Tab2. So I want to change the active tab on button click ( after the ajax call finishes ). Can I do so? I've created a jsFiddle here I tried onclick='$("#tabs-2").trigger("click") '> but it didn't do anything. krasu Use onclick='$("#tabs").tabs( "select", "tabs-2" )' http://jqueryui.com/demos/tabs/#method-select As info (in case someone stumbles upon this later and gets an error on the select method) - In jQuery-UI 1.9+, the select method was deprecated

Get the ID of the tab (div) being activated

笑着哭i 提交于 2019-12-04 14:58:15
问题 I'm using jquery 1.9 and jquery UI 1.10 I want to be able to get the tab ID when clicking on a tab. For example if I clicked tab named "Second" I want to get "tabs-2" response. I've done the below code so far: <script type="text/javascript"> $(function () { $("#tabs").tabs({ beforeActivate: function (event, ui) { alert(/* the id of the tab (div) being activated */); } }); }); </script> <div id="tabs"> <ul> <li><a href="#tabs-1">First</a></li> <li><a href="#tabs-2">Second</a></li> </ul> <div

Google Map API V3 on hidden div (jquery-ui tabs)

浪子不回头ぞ 提交于 2019-12-04 13:08:20
I know this problem is ancient, but I can't seem to find a clear instruction for it. The gist of the problem is the Google Map wouldn't load completely (partly shown) when it's loaded on a hidden (display:none) divs, e.g. jQuery tabs, etc. API V3 wouldn't accept checkResize() any more, the 'left:-1000px' is not an elegant solution. I've heard delaying constructing the map, and reload the map when click the tabs, but please help me on the exact codes. TMS Why do you say "left:-1000px' is not an elegant solution" ? It works for me greatly in API v2 and should work also for API v3 (not tested,

AJAX request using jQuery does not work

走远了吗. 提交于 2019-12-04 05:51:28
问题 So I am new to jQuery and I'm trying to set up an html page that has tabs. Each tab should show a different html page as follows: <div id="tabs"> <a href="page1.html"><div class="tabdiv tabActive">Page1</div></a> <a href="page2.html"><div class="tabdiv">Page2</div></a> <a href="page3.html"><div class="tabdiv">Page3</div> </a> <a href="page4.html"><div class="tabdiv">Page4</div></a> </div> <div class="tabscontent" id="ajax-content"> Default text </div> So what I want is that when I click on

jQuery: How to bind an event for the div when it becomes visible?

北城余情 提交于 2019-12-04 03:38:57
问题 I've got a div element: <div id="tab1"> Tab data </div> . How to bind a custom event when this div becomes visible (gets display: block; )? And also I'd like to bind an event when this div becomes invisible (gets display: none; ). I'd like to do this in jQuery. Edit: I'm making simple tabs with ajax content. I want the content on this tabs to be ajax-updated only when the tab is visible. 回答1: Start and stop the AJAX update based on the visibility. You can use .is() to return a TRUE or FALSE

I need to add custom css to jquery tabs when it is selected, how?

穿精又带淫゛_ 提交于 2019-12-02 18:26:37
问题 I need to modify the css of .ui-state-active , .ui-widget-content .ui-state-active to the following: .ui-state-active , .ui-widget-content .ui-state-active { background-image: url('images/tab-over.png') !important; } However, when I do that I get the desired effect but other elements on the website get affected when clicked. I want this function only when I click a tab. Is there a safer way to do this ? Here is my html code: <div id="tabs"> <div id="left-side"> </div> <ul class="tab-menu">