...

View Full Version : tab navigation not working! help please!



youngnooblet
07-26-2011, 06:17 PM
This tab is supposed to show only one section at a time (i.e when you click on the tab, it only shows one section such as the content of "curriculum") How can I get it to work like that/ what is wrong with my code? Thanks so much!!

i attached the css to this post.
below is the complete html



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Web site</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="title" content="Web site" />
<meta name="description" content="Site description here" />
<meta name="keywords" content="keywords here" />
<meta name="language" content="en" />
<meta name="subject" content="Site subject here" />
<meta name="robots" content="All" />
<meta name="copyright" content="Your company" />
<meta name="abstract" content="Site description here" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<link id="theme" rel="stylesheet" type="text/css" href="style.css" title="theme" />
<script type="text/javascript" language="javascript" src="js/addon.js"></script>
<script type="text/javascript" language="javascript" src="js/custom.js"></script>
<!--TABs testing-->
<script type="text/javascript" src="js/addclasskillclass.js"></script>
<script type="text/javascript" src="js/attachevent.js"></script>
<script type="text/javascript" src="js/addcss.js"></script>
<script type="text/javascript" src="js/tabtastic.js"></script>

<!--TABs-->
<script type="text/javascript">
$(document).ready(function(){
var tabContainers = $('div#tab_wrapper > div');
tabContainers.hide().filter(':first').show();
$('#tab_nav ul li a').click(function () {
tabContainers.hide();
tabContainers.filter(this.hash).show();
$('#tab_nav ul li a').removeClass('active');
$(this).addClass('active');
return false;
}).filter(':first').click();
var bookmark = location.href.substr(location.href.lastIndexOf('#'));
$('#tab_nav ul li a[href="' + bookmark + '"]').click();
});
</script>

</head>
<body>
<!-- top wrapper -->
<div id="topBannerWrapper">
<div id="topBanner">
<div id="hmenuWrapper">

<div id="hmenu">
<ul>
<li id="current" style="border:none"> <a href="#" shape="rect">Home</a>
</li>
<li> <a href="#" shape="rect">About Us</a> </li>
<li> <a href="#" shape="rect">Services</a> </li>
<li> <a href="#" shape="rect">Resources</a> </li>
<li> <a href="#" shape="rect">Contact Us</a> </li>
</ul>
</div>
</div>
</div>
</div>


<!-- end top wrapper -->

<div id="wrapper">
<div id="container">
<div id="content">
<div id="tab_nav">
<ul>
<li><font size="3"><a href="#tab1">Overview</a></font></li>
<li><font size="3"><a href="#tab2">Instructors</a></font></li>
<li><font size="3"><a href="#tab3">Approach</a></font></li>
<li><font size="3"><a href="#tab4">Curriculum</a></font></li>
<li><font size="3"><a href="#tab5">Results</a></font></li>
</ul>
</div>
<div id="tab_wrapper">
<div class="tab" id="tab1">
<h3> <font size="5"><br>
<font size="4">About PowerTestPrep</font></font></h3>
<p> <font size="3">PowerTestPrep sprouted from this simple belief: the
best way for students to beat standardized tests is to learn from
high school and college students who have attained top 1% scores on
the tests themselves.<br />
<br />
At PowerTestprep, we maximize your SAT score by teaching you the tips
and tricks that give the biggest boosts in scores. With our PowerTest
Approach, we increase score-improvement efficiency by giving our students
custom-tailored curriculums based on their results from diagnostic
tests. By the end of our programs, students learn to recognize faults
in logic for maximum score improvement.<br />
<br />
We offer our services across the East Coast.</font></p>
</div>

<div class="tab" id="tab2">
<h3> <font size="4"><br>
Top 1% Instructors</font></h3>
<p> <Returns Policy="codeword"> <font size="3">Teaching students to
beat the SAT, ACT, and AP tests requires special insight- the type
of insight that only comes with beating the test one's self. Most
major test prep companies do not publish their instructors' SAT scores,
so you do not know what you are paying for. It is possible that the
instructors themselves have scored poorly on standardized tests.<br />
<br />
At PowerTestPrep, we hire only the best of the best. Our instructors
are the top 1% SAT and ACT test takers in the world. Most of our SAT
Reasoning Test instructors have received SAT superscores of 2350 or
higher; most of our ACT instructors have received a 35 or higher;
our SAT Subject Test instructors have received scores of 780 or higher.
Proof of our scores are available on request. Through our tutoring
programs, you are guaranteed top notch service. </font></p>
</div>
<div class="tab" id="tab3">
<h3><font size="4"><br>
PowerTestPrep Approach</font></h3>
<p> <Returns Policy="codeword"> <font size="3">Our approach works by
primarily focusing on raising the SAT super-score, so you can focus
one section at a time. We show you all the tips and tricks that major
test prep companies cannot. As an example, we present to you a real
SAT test question. Then, we compare our strategy to the strategy from
Princeton Review's Test Prep Book (every year, this company "teaches"
thousands of students in its &quot;effective&quot; test prep program!).
</font></p>
<p><font size="3">This is the type of question that appears perennially
on the SAT:<br />
A girl rides her bicycle to school at an average speed of 8 mph. She
returns to her house using the same route at an average speed of 12
mph. If the round trip took 1 hour, how many miles is the round trip.<br />
</font></p>
<ol>
<li><font size="3">8</font></li>
<li><font size="3">9 3/5</font></li>
<li><font size="3">10</font></li>
<li><font size="3">11 1/5</font></li>
<li><font size="3">12</font></li>
</ol>
<p></p>
<p><font size="3">Princeton Review offers this solution: First the problem
is a hard problem (level 5). The College Board assumes that the common
student will not attempt to solve the problem and pick the trick answer
of 10 since it represents the average of 8 and 12. The common student
second choice will be to pick a value that is stated in the problem:
8 or 12. Princeton Review provides the strategy to eliminate those
"too simple to be true" answers. The conclusion of PR is to end up
with two choices and pick between B and D. In their words, the student
will be in great shape!</font></p>
<p><font size="3">What's the issue with this? A 50-50 chance is really
not good enough. When you consider how this problem can be solved,
the recommendation to guess becomes highly questionable.</font></p>
<p><font size="3">What could a student have done? Use a simple formula
for average rates -an opportunity that PR strangely forgets to mention.
<br />
Here it is:<br />
Number of miles= [2*Speed1*Speed2] / [speed1 + Speed2] or in this
case:</font></p>
<p><font size="3"><br />
Number of miles= 2* 8 * 12 / 8 + 12.</font></p>
<p><font size="3">Most everyone will notice that the answer is 2*96/20
or simply 96/10. This yields 9.6 or 9 3/5. The total time to do this,
probably 20-45 seconds. Not a bad method to know!</font></p>
</div>
<div class="tab" id="tab4">
<h3><font size="4"><br>
Superior Curriculum</font></h3>

<p> <Returns Policy="codeword"> <font size="3">Each of our students'
curriculums is custom-tailored to fit their needs. We start with a
diagnostic test, to identify faults in logic and weaknesses in test-taking
strategy. Then, our instructors devise a specialized curriculum for
maximum score improvement. We call this Guided Prep, which is a complimentary
20-hour program that each student completes at home to maximize SAT
preparation efficiency. Following each personalized Guided Prep session,
our instructors make sure students fully understand the concepts,
rather than only memorizing techniques. We also provide unlimited
email feedback from our tutors; you may ask any questions you have
about specific questions, and your tutors will get back to you with
an answer within 24-hours. <br />
<br />
Our curriculum is focused on gaining results. We do not waste any
time on techniques that do not effectively raise scores. Because of
this philosophy, our students tend to see direct improvements in their
scores following each practice examination. </font></p>
</div>
<div class="tab" id="tab5">
<h3><font size="4"><br>
Results</font></h3>
<p> <font size="3">Our students receive the highest score improvements,
and out results are simply unmatched. <br />
Here are our statistics:<br />
<br />
• 314: Average SAT I score improvement of PowerTestPrep 30-hour tutoring
students<br />
• 265: Average SAT I score improvement of PowerTestPrep 20-hour tutoring
students<br />
• 238: Average SAT I score improvement of PowerTestPrep 10-hour tutoring
students<br />
• 118: Average single-subject SAT (I and II) score improvement of
PowerTestPrep 10-hour tutoring students<br />
• 97: Percentage of PowerTestPrep students who say they'd recommend
PowerTestPrep to their friends<br />
• 83: Percentage of PowerTestPrep students who rate their tutor a
perfect 5 out of 5<br />
• 73: Percentage of PowerTestPrep tutors with one or more perfect
SAT section scores<br />
• 4.89: Average student rating of PowerTestPrep tutors on a 5-point
scale<br />
• 4.21: Average ACT score improvement of PowerTestPrep students</font></p>
</div>
</div>
</div>
</div>




</body>
</html>

youngnooblet
07-27-2011, 02:16 AM
bump asfsd

Sammy12
07-27-2011, 02:35 AM
your talking about the "overview, instructors.."

those are intra-links, they jump to the part of the page with that id. you could use a javascript if clicked, then #tab.selected + div { display: none; } but honestly, i find intra-links extremely annoying and I would advise that you not use them :). If you do use them, users are expecting them, and expect the content below them to be visible

youngnooblet
07-31-2011, 02:28 AM
Hey sammy,
What do you mean by set {display: none} ?I want it to only view one section at once. If I set it to display: none, won't it not display any content at all? Thanks

edit: nvmd, fixed it. just forgot to copy javascript over. thanks!

Sammy12
07-31-2011, 02:46 AM
with + div your telling the div after the one you selected to not display :) just food for thought



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum