Quotes help make search much faster. Example: "Practice Makes Perfect"

Tuesday, December 18, 2012

Codecademy Sample Solution: Codeyear Displaying and Hiding the Pages



<!DOCTYPE html>
<html>
    <head>
        <title>Menu Navigator</title>
        <link rel="stylesheet" href="style.css">
        <script src='script.js'></script>
    </head>
    <body>
     <div class="tabbed-menu">
        <ul class="tabs">
            <li id="page1" class="selected"></li>
            <li id="page2" class="tabs"></li>
            <li id="page3" class="tabs"></li>
            <li id="page4" class="tabs"></li>
        </ul>
        <div class="content">
            <div class="page" id="page1" style="display:block;"><p>Whatever text you want 1</p></div>
        </div>
        <div class="content">
            <div class="page" id="page2" style="display:none;"><p>Whatever text you want 2</p></div>
        </div>
        <div class="content">
            <div class="page" id="page3" style="display:none;"><p>Whatever text you want 3</p></div>
        </div>
        <div class="content">
            <div class="page" id="page4" style="display:none;"><p>Whatever text you want 4</p></div>
        </div>
     </div>
    </body>
</html>

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts