Forum Moderators: open
Each of the tabs has its own CSS ID (#tab1, #tab2, #tab3).
The effect is when any of the tabs are clicked the content and background in the panel change.
It isn't a difficult effect to do, but not knowing javascript I'm wondering where to start with changing the visibility or z-index for each layer.
This is something that will be used exclusively in IE browsers--if that makes any difference.
Can someone point me to a good tutorial that covers this task? Or at least give me a clue where to begin.
These could possibly be layered on top of "always on-always background" tabs.
Hope this helps you get started..
On click of a tab, set the current_tab css class to inactive (obj.className = 'tabInactive') and set current_tab to the tab clicked (current_tab = event.srcElement). Then, set current_tab's class to tabActive.
What happens is when a link is clicked it runs the function showPage. It uses the class .page to hide/display each section.
Is there a way to make it so instead of clicking on the link the same thing will happen when the cursor rolls over the link?
The Function
-------------------------------------------------
<script language="javascript" type="text/javascript">
var objPage = null;
function showPage(pageName) {
if (objPage) objPage.style.display = 'none';
objPage=document.getElementById(pageName);
objPage.style.display = 'block'
}
</script>
-------------------------------------------------
CSS Class .page
-------------------------------------------------
<style type="text/css">
.page { display:none;}
</style>
-------------------------------------------------
The Link
-------------------------------------------------
<a href="javascript:showPage('page1')" target="_self">This is the section</a>
-------------------------------------------------
The Section to display
-------------------------------------------------
<div id="page1" class="page">
<h2>This Is the Section</h2>
Be sure to bookmark this Microsoft DHTML reference [msdn.microsoft.com] for your toolbox. onMouseOver is described under "Events".