JQuery tab tool

Sorry, I've just realised the exec script is wrong. Try:

Code:
<script>
$(function() {
	// setup ul.tabs to work as tabs for each div directly under div.panes
	$("ul.tabs").tabs("div.panes > div");
});
</script>
 
Unfortunately it still seems to act the same way. This is how it looks currently:

untitled.jpg


Think its best just quitting this angle? Quite annoying as I was very keen to get it in this project, would look pretty nice.
 
It goes to the css file itself. I assumed it just looked like it wasnt working as it links background images I dont have
 
Sorry, I mean what's in it. I was looking at your page and thinking in source view in Firefox, which when you click a css link shows you the css.

Edit: I think I know what may be wrong, if youve just taken the tabs.css from their demo page. They have included this in the header, which is paramount. Add this to your tabs.css

Code:
/* tab pane styling */
.panes div {
	display:none;		
	padding:15px 10px;
	border:1px solid #999;
	border-top:0;
	height:100px;
	font-size:14px;
	background-color:#fff;
}
 
Last edited:
Sorry clearly I am not too sharp this morning. This is the css file:

Code:
/* root element for tabs  */
ul.tabs { 
	list-style:none; 
	margin:0 !important; 
	padding:0;	
	border-bottom:1px solid #666;	
	height:30px;
}

/* single tab */
ul.tabs li { 
	float:left;	 
	text-indent:0;
	padding:0;
	margin:0 !important;
	list-style-image:none !important; 
}

/* link inside the tab. uses a background image */
ul.tabs a { 
	background: url(/tools/img/tabs/blue.png) no-repeat -420px 0;
	font-size:11px;
	display:block;
	height: 30px;  
	line-height:30px;
	width: 134px;
	text-align:center;	
	text-decoration:none;
	color:#333;
	padding:0px;
	margin:0px;	
	position:relative;
	top:1px;
}

ul.tabs a:active {
	outline:none;		
}

/* when mouse enters the tab move the background image */
ul.tabs a:hover {
	background-position: -420px -31px;	
	color:#fff;	
}

/* active tab uses a class name "current". its highlight is also done by moving the background image. */
ul.tabs a.current, ul.tabs a.current:hover, ul.tabs li.current a {
	background-position: -420px -62px;		
	cursor:default !important; 
	color:#000 !important;
}

/* Different widths for tabs: use a class name: w1, w2, w3 or w2 */


/* width 1 */
ul.tabs a.s 			{ background-position: -553px 0; width:81px; }
ul.tabs a.s:hover 	{ background-position: -553px -31px; }
ul.tabs a.s.current  { background-position: -553px -62px; }

/* width 2 */
ul.tabs a.l 			{ background-position: -248px -0px; width:174px; }
ul.tabs a.l:hover 	{ background-position: -248px -31px; }
ul.tabs a.l.current  { background-position: -248px -62px; }


/* width 3 */
ul.tabs a.xl 			{ background-position: 0 -0px; width:248px; }
ul.tabs a.xl:hover 	{ background-position: 0 -31px; }
ul.tabs a.xl.current { background-position: 0 -62px; }


/* initially all panes are hidden */ 
.panes .pane {
	display:none;		
}
 
Sorry that was a bit dumb to miss. This is what I've got now:

untitled2.jpg


The red at the bottom is just a bit of the footer i didnt clip

Do you have any idea what the underlying problem is here?
 
Off the top of my head now, no. You have the tools included, the css is working, the markup is right and the exec script is right.

I see no immediate reason why it wouldn't work. If you want to add me to msn I can work through some things faster with you, but it may have to wait till later.
 
Unfortunately my work blocks msn, scumbags! Skype works if that would do and here until 6.15pm or so. Skype name is shicky4.

Im a bit confused why it doesnt display the first pane of text and why when you click on a tab it flicks to the top of the page
 
Solved: for others watching the thread.. old Jquery library version meant the tools weren't working properly.
 
Just a little follow up to this, all functions perfectly. However one issue there at the moment is the difference in height.

For example, some products require a pretty big table (greaters than 500pixels), other products only require 200pixels or less. So it looks a bit stupid and unbalanced with massive white space in a table under some. Is there a way to set my table to auto-adjust in height due to the content?
 
Back
Top Bottom