You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

tabs function not working... Created Sep 4, 2009

This thread is solved

Views: 3509     Replies: 5     Last reply Dec 26, 2010  
You must login first before you can use this feature

julienbri

Posts: 5

Registered:
Sep 4, 2009

tabs function not working...

Posted: Sep 4, 2009

I'm trying to implement the first example of tabs, keeping everything really simple, just like the very first setup of tabs. But the tabs() function doesn't do anything. all 3 tabs stay hidden all the time.

Any idea of what I am doing wrong?
Here's my code:

<head>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
	<script src="http://cdn.jquerytools.org/1.1.0/jquery.tools.min.js"></script>
</head>
<body>
<!-- tab styling -->
<link rel="stylesheet" type="text/css" href="http://static.flowplayer.org/tools/css/tabs.css" />

<!-- tab pane styling -->
<style>

/* tab pane styling */
div.panes div {
	display:none;		
	padding:15px 10px;
	border:1px solid #999;
	border-top:0;
	height:100px;
	font-size:14px;
	background-color:#fff;
}

</style>

<!-- the tabs -->
<ul class="tabs">
	<li><a href="#">Tab 1</a></li>
	<li><a href="#">Tab 2</a></li>
	<li><a href="#">Tab 3</a></li>
</ul>

<!-- tab "panes" -->

<div class="panes">
	<div>First tab content. Tab contents are called "panes"</div>
	<div>Second tab content</div>
	<div>Third tab content</div>
</div>

<!-- This JavaScript snippet activates those tabs -->
<script>

// perform JavaScript after the document is scriptable.
$(function() {
	// setup ul.tabs to work as tabs for each div directly under div.panes
	$("ul.tabs").tabs("div.panes > div");
});
</script>

</body>

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» tabs function not working...

Posted: Sep 4, 2009

Reply to: tabs function not working..., from julienbri
Everything seems good. Try to supply height for the div.panes element. Also this jQuery library inclusion from Google API's is not needed.

Can I see a live demo about this?

julienbri

Posts: 5

Registered:
Sep 4, 2009

» » tabs function not working...

Posted: Sep 4, 2009

Reply to: » tabs function not working..., from tipiirai
Just added 100px height for the divs, but no change...
Here is a live demo:
http://www.muendo.com/users/contactsHome

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» » » tabs function not working...

Posted: Sep 4, 2009

Reply to: » » tabs function not working..., from julienbri
You have loads of different javascript files included on the page. My guess is that the tabs are conflicting with the jQuery UI tabs that are also included on the page.

First try to make a minimal setup page without additional script inclusions. only the jQuery Tools. Then start adding more stuff.

julienbri

Posts: 5

Registered:
Sep 4, 2009

» » » » tabs function not working...

Posted: Sep 4, 2009

Reply to: » » » tabs function not working..., from tipiirai
That was exactly it! Thanks a lot!!!