• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 589
  • Last Modified:

yahoo tabs example

Hello experts

can any body please guide me to an example or tutorial on how to make a TABS script like the one on www.yahoo.com in the Top-Right of the main page (the one which contain  6 button Mail, Messanger, Radio ......  Weather)

Thanks alot
0
FLAASHER
Asked:
FLAASHER
  • 6
  • 2
  • 2
  • +2
1 Solution
 
hieloCommented:
See if any of these suit your needs:
http://dynamicdrive.com/dynamicindex1/ddtabmenu.htm

Example 5 looks similar to what you are looking for (I think).
0
 
FLAASHERAuthor Commented:
Sorry :(
It is not what i want
what i need is 2 rows buttons (each row contain 3 buttons which expand when mouse over )

please check yahoo page (the part which contain MAIL button is what i want exactly)


thanks alot
0
 
yo_s_cantaCommented:
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
FLAASHERAuthor Commented:
Not what i want :(
this is exactly what i want :



Thanks all
yahoooooooooooooooooooooo.jpg
0
 
hieloCommented:
I can see what you want, but even yahoo does not offer that on its tab library. You will need to implement it. I put something together based on this site:
http://phrogz.net/JS/Tabtastic/index.html

It should get you started. Save it as is and test it. I'll be back later.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title></title>
	<link href="http://phrogz.net/JS/Tabtastic/tabtastic.css" type="text/css" rel="stylesheet"/>
	<script type="text/javascript" src="http://phrogz.net/common/addclasskillclass.js"></script>
	<script type="text/javascript" src="http://phrogz.net/common/attachevent.js"></script>
	<script type="text/javascript" src="http://phrogz.net/common/addcss.js"></script>
	<script type="text/javascript" src="http://phrogz.net/JS/Tabtastic/tabtastic.js"></script>
 
<script type="text/javascript"><!--
function collapse(e)
{
	e = document.getElementById(e);
	e.style.display='none';
	e.className='active';
}
function expand(e)
{
	e = document.getElementById(e).style;
	e.display='block';
	e.className="active";
}
window.onload=init;
 
function init()
{
	collapse('tab1');
}
//--></script>
</head>
<body>
<ul class="tabset_tabs">
   <li><a href="#tab1" onmouseover="expand('tab1')" onmouseout="collapse('tab1')">Tab 1</a></li>
   <li><a href="#tab2" onmouseover="expand('tab2')" onmouseout="collapse('tab2')">Tab 2</a></li>
   <li><a href="#tab3" onmouseover="expand('tab3')" onmouseout="collapse('tab3')">Tab 3</a></li>
</ul>
 <div style="line-height:2px;">&#160;</div>
<ul class="tabset_tabs">
   <li><a href="#tab4" onmouseover="expand('tab4')" onmouseout="collapse('tab4')">Tab 4</a></li>
   <li><a href="#tab5" onmouseover="expand('tab5')" onmouseout="collapse('tab5')">Tab 5</a></li>
   <li><a href="#tab6" onmouseover="expand('tab6')" onmouseout="collapse('tab6')">Tab 6</a></li>
</ul>
 
<div id="tab1" class="tabset_content">
   <h2 class="tabset_label">Tab 1</h2>
   <p>Tab 1 Content</p>
</div>
 
<div id="tab2" class="tabset_content">
   <h2 class="tabset_label">Tab 2</h2>
   <p>Tab 2 Content</p>
</div>
 
<div id="tab3" class="tabset_content">
   <h2 class="tabset_label">Tab 3</h2>
   <p>Tab 3 Content</p>
</div>
 
<div id="tab4" class="tabset_content">
   <h2 class="tabset_label">Tab 4</h2>
   <p>Tab 4 Content</p>
</div>
 
<div id="tab5" class="tabset_content">
   <h2 class="tabset_label">Tab 5</h2>
   <p>Tab 5 Content</p>
</div>
 
<div id="tab6" class="tabset_content">
   <h2 class="tabset_label">Tab 6</h2>
   <p>Tab 6 Content</p>
</div>
 
</body>
</html>

Open in new window

0
 
FLAASHERAuthor Commented:
Dear hielo

thanks for your effort ...
realy i downt know how to modify your example to make the same as i want .... i need mor help on this

Thanks again
0
 
yo_s_cantaCommented:
Hello,
I made tabs like yahoo has.
Please download jquery (www.jquery.com) javascript framework to see this in action
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title>Untitled Page</title>
    <style>
        ul li {
			float:left;
			list-style:none;
			padding:5px;
			border:1px solid black;
			width:100px;
		}
		ul {
			margin:0;
			padding:0;
			display:block;
			overflow:hidden;
		}
		.content { 
			height:100px;
			width:334px;
			border:1px solid red;
		}
    </style>
</head>
<script src="jquery.js"></script>
<script>
	$(document).ready( function () {
		var last = "";
		$("#stat").html("good");
		$(".content").hide();
		$(".cont").hide();
		$(".tabs").mouseover( function () {
			$("li").mouseover( function () {
				var cont = "#"+$(this).attr("id")+"content";
				if (last) $(last).hide();
				$(cont).show();
				$(".cont").slideDown();
				last = cont;
			});
		});
	});
</script>
<body>
<div id="stat">Status</div>
<div id="line1" class="tabs">
	<ul>
    	<li id="1">wewe</li>
        <li id="2">sdfgsdfg</li>
        <li id="3">itoyuoi</li>
    </ul>
    <div class="cont">
    <div id="1content"class="content">Content 1</div>
    <div id="2content" class="content">Content 2</div>
    <div id="3content" class="content">Content 3</div>
    </div>
</div>
<div id="line2" class="tabs">
	<ul>
    	<li id="4">wewe</li>
        <li id="5">sdfgsdfg</li>
        <li id="6">itoyuoi</li>
    </ul>
    <div class="cont">
    <div id="4content"class="content">Content 4</div>
    <div id="5content" class="content">Content 5</div>
    <div id="6content" class="content">Content 6</div>
    </div>
</div>
</body>
</html>

Open in new window

0
 
FLAASHERAuthor Commented:
i tried it
not working correctly :(

any other ideas !!
0
 
BadotzCommented:
Have you tried viewing the source of the yahoo page to see how they do it?
0
 
FLAASHERAuthor Commented:
i tried

But no resluts :(

it is not easy to get it

0
 
BadotzCommented:
Is the source not visible?
0
 
FLAASHERAuthor Commented:
some parts is not visible
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 6
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now