jquery-ui-tabs

Jquery tabs - Showing a confirmation before activate

淺唱寂寞╮ 提交于 2019-12-01 22:49:05
I'm using jquery UI's tabs. When a user switches tabs, I'm checking for unsaved changes, and prompting the user accordingly. However, before the user even clicks Yes or No, the tab loads anyway. Does anyone know how I can get my function to NOT return anything until after the result has come back from my fancybox dialog? You can see I've tried a couple of different methods to return my boolean value in CheckSomething(). $("#myTabs").tabs({ select: function (event, ui) { return CheckSomething(); }, show: function (event, ui) { //do some stuff } }); function CheckSomething() { var loadMyTab =

JQuery UI Tabs - Clear Cached Tab

随声附和 提交于 2019-12-01 21:52:49
问题 I have a set of JQuery UI tabs on a given page and have set the cache property to true for them to reduce the number of requests that are issued. I also have a select list outside of the tabs which is used to provide a parameter to the requests that are made to load the tabs. Problem: If the user clicks all the tabs and all of them load and then selects a different item from the select list, the tabs will all be showing information from the previously selected select option. I would like to

JQuery UI Tabs - Clear Cached Tab

心已入冬 提交于 2019-12-01 21:32:30
I have a set of JQuery UI tabs on a given page and have set the cache property to true for them to reduce the number of requests that are issued. I also have a select list outside of the tabs which is used to provide a parameter to the requests that are made to load the tabs. Problem: If the user clicks all the tabs and all of them load and then selects a different item from the select list, the tabs will all be showing information from the previously selected select option. I would like to be able to clear the tab cache when the user selects a new option from the select list so that when they

jQuery UI Tabs not hiding inactive tabs on load

廉价感情. 提交于 2019-12-01 20:42:35
问题 I'm having a strange problem with jQuery tabs. The tabs are working fine, but the inactive panels are remaining visible on load, and it's only when selecting other tabs that they are hidden. Here is my code: <head> <link rel="stylesheet" href="css/jquery.ui.all.css" type="text/css" media="screen" /> <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="js/jquery-ui.custom.min.js"></script> <script type="text/javascript"> jQuery.noConflict();

jQuery UI Tabs not hiding inactive tabs on load

孤街醉人 提交于 2019-12-01 19:42:15
I'm having a strange problem with jQuery tabs. The tabs are working fine, but the inactive panels are remaining visible on load, and it's only when selecting other tabs that they are hidden. Here is my code: <head> <link rel="stylesheet" href="css/jquery.ui.all.css" type="text/css" media="screen" /> <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="js/jquery-ui.custom.min.js"></script> <script type="text/javascript"> jQuery.noConflict(); (function($) { $(function() { /* UI Tabs */ $.fn.tabs && $(".tabs").tabs(); }); }) (jQuery); </script>

jQuery UI tabs: how to send ajax request with post data?

六月ゝ 毕业季﹏ 提交于 2019-12-01 19:36:38
From jQuery UI tabs : <script> $(function() { $( "#tabs" ).tabs({ ajaxOptions: { error: function( xhr, status, index, anchor ) { $( anchor.hash ).html("Couldn't load this tab."); } } }); }); </script> <div class="demo"> <div id="tabs"> <ul> <li><a href="#tabs-1">Preloaded</a></li> <li><a href="ajax/content1.html">Tab 1</a></li> <li><a href="ajax/content2.html">Tab 2</a></li> </ul> <div id="tabs-1"> <p>Proin elit arcu, rutrum commodo.</p> </div> How to send ajax request with post data in this case (maybe through ajaxOptions). I do not know how to modify tabs urls to send post data, for example:

jQuery UI tabs: how to send ajax request with post data?

和自甴很熟 提交于 2019-12-01 19:21:15
问题 From jQuery UI tabs: <script> $(function() { $( "#tabs" ).tabs({ ajaxOptions: { error: function( xhr, status, index, anchor ) { $( anchor.hash ).html("Couldn't load this tab."); } } }); }); </script> <div class="demo"> <div id="tabs"> <ul> <li><a href="#tabs-1">Preloaded</a></li> <li><a href="ajax/content1.html">Tab 1</a></li> <li><a href="ajax/content2.html">Tab 2</a></li> </ul> <div id="tabs-1"> <p>Proin elit arcu, rutrum commodo.</p> </div> How to send ajax request with post data in this

Trigger a function when a jQuery UI tab is clicked/made active?

孤街醉人 提交于 2019-12-01 18:04:02
问题 I'm using jQuery tabs and the content in one of the tabs is retrieved via an AJAX call. But I don't want to trigger the call until the tab is clicked (made active) because the user might not necessarily click it. What's the best way to do this? jQuery UI provides select and show events for the tabs, but these fire when any tab is selected or shown, not just a specific one (as far as I know). I've also tried assigning a click event to the specific tab's ID: $("#my-tab").click(function(){ ... $

How to trigger('click') on jquery tab's currently active tab

流过昼夜 提交于 2019-12-01 16:43:41
I have a tabed screen and want to trigger a click on the selected tab once the form is submitted and the return is valid. Here a part of the html: <ul id="tabUL" class="tabs js-tabs same-height"> <li class="current"> <a class="tabLink" href="#tabProducts" data-url="/bla/bla">Products</a> </li> </ul> My success command is : success: function(data, textStatus, XMLHttpRequest) { $('#tabUL').find('li.current a').trigger('click'); } This seems not working... Any help is appreciated :) Regards Andrea Try using the a[href=""] selector: $('#tabUL a[href="#tabProducts"]').trigger('click'); I put

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

人盡茶涼 提交于 2019-12-01 13:51:55
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 contains links. The user clicks a link within tab_a and it opens fine. Then, tab_b is selected, then tab_a,