jquery-tabs

AJAX request using jQuery does not work

有些话、适合烂在心里 提交于 2019-12-02 09:41:05
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 page 1, page1.html will be loaded up in div.tabscontent . This is the jQuery code that I have. $(document

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

你。 提交于 2019-12-02 09:40:17
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"> <li id="home"> <a href="<%= Url.Action("GetCoreTab", "Tab") %>" class="a"> <b> <div id="home" class="menu

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: How to bind an event for the div when it becomes visible?

懵懂的女人 提交于 2019-12-01 18:20:54
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. Start and stop the AJAX update based on the visibility. You can use .is() to return a TRUE or FALSE for :visible : var timer; // Variable to start and top updating timer // This if statement has to be part of

jQuery - Tabs inside of tabs?

夙愿已清 提交于 2019-12-01 08:45:43
I'm trying to arrange tabs inside of tabs using jQuery. Below is the HTML, CSS, and JS that I'm using. How can I insert a couple tabs within #tab2 ? HTML <ul class="tabs"> <li><a href="#tab1">Podcasts</a></li> <li><a href="#tab2">Videos</a></li> </ul> <div id="tab1" class="tab_content"> <p>test</p> </div> <div id="tab2" class="tab_content"> <div id="tab2-1"> <-- Tab 2-1 inside of #tab2 <p>test</p> </div> <div id="tab2-2"> <-- Tab 2-2 inside of #tab2 <p>test</p> </div> </div> CSS .tab_content { background:#fff;padding:10px;width:100% } .tabs li { display:inline;list-style:none } .tabs a {

jQuery tabs: panel covers tabs at 100% height

天涯浪子 提交于 2019-12-01 02:54:55
I'm trying to use the tabs widgets of jQuery-UI having panels content to extend to the whole available space. Here's a simplified version of what I've got so far: http://jsfiddle.net/MhEEH/3/ You'll see that the green panel content of #tab-1 just covers the whole page, instead of just the panel space, when I use the following CSS: #tab-1 { background: green; position: absolute; top: 0; bottom: 0; left: 0; right: 0; } I could use "top: 27px;" to fix that, but this would collide with two things: If I change the tabs "theme", the height (27px) could possibly change If I have a lot of tabs, I'll

JQuery Tools tabs conflicts with JQuery UI

允我心安 提交于 2019-11-30 13:58:00
问题 I'm using JQuery tools' tabs feature and at the same time I use JQuery UI. If I include both JS libraries, Jquery tools with tabs does not work. How to fix this conflict? Any help is appreciated. Thanks in advance. 回答1: You could get a custom jQuery-ui build that that doesn't include the tabs but that might cause some confusion later on. A better approach, IMHO, would be to edit the jQuery-tools tabs.js and change this line: $.fn.tabs = function(query, conf) { to something like this: $.fn

JQuery Tools tabs conflicts with JQuery UI

馋奶兔 提交于 2019-11-30 08:57:54
I'm using JQuery tools' tabs feature and at the same time I use JQuery UI. If I include both JS libraries, Jquery tools with tabs does not work. How to fix this conflict? Any help is appreciated. Thanks in advance. You could get a custom jQuery-ui build that that doesn't include the tabs but that might cause some confusion later on. A better approach, IMHO, would be to edit the jQuery-tools tabs.js and change this line: $.fn.tabs = function(query, conf) { to something like this: $.fn.fpTabs = function(query, conf) { I used "fpTabs" for "flowplayer.org tabs", you can use whatever name works for

Google Maps Not Working in jQuery Tabs

可紊 提交于 2019-11-28 08:43:05
Google maps not working when placed inside jQuery tabs is a question that's all over the web. In my research so far none of the solutions seem to work. Hopefully someone here can help... This is a screenchot of the error in Firefox 10, Chrome 17, Safari 5.1.2, Opera 11.61. http://www.flickr.com/photos/75523633@N04/6932970713/ The error is not present in IE8 and is intermittant in 9. In Firefox, it goes away when you open FireBug. The site is in Wordpress 3.3.1 and the map is generated/retrieved via a plugin. It does not seem to matter which maps plugin I use; the error remains the same. Based

Can I keep on same jQuery tab on page refresh or when I have navigated away from the page?

佐手、 提交于 2019-11-28 01:41:54
I have a basic jQuery tabs system going: $(document).ready(function(){ $('#tabs div.jdiv').hide(); $('#tabs div.jdiv:first').fadeIn("slow"); $('#tabs ul.jdiv li:first').addClass('active'); $('#tabs ul.jdiv li a').click(function(){ $('#tabs ul.jdiv li').removeClass('active'); $(this).parent().addClass('active'); var currentTab = $(this).attr('href'); $('#tabs div.jdiv').hide(); $(currentTab).fadeIn("slow"); return false; }); }); <div id="tabs" style="position:relative; "> <ul class="jdiv"> <li><a href="#current-points">Current Points</a></li> <li><a href="#my-details">My Details</a></li> <li><a