HTML Side menu

 <!DOCTYPE html>

<html>

<head>

<meta charset="ISO-8859-1">

<title>Product sheet </title>

 <script src="http://code.jquery.com/jquery-1.9.1.js"></script>


</head>

<body>

<div class="header">

     <h1>Product sheet </h1>

</div>

<div class="nav">

    <ul>

        <li><a href="#section-london">Product</a></li>

        <li><a href="#section-paris">click 2 </a></li>

         <li><a href="#section-london1">Click 3</a></li>

        <li><a href="#section-paris1">click 4 </a></li>

    </ul>

</div>

<div id="section-london" class="tab-content">

<h2>Product Details</h2>

<p>This will show you the product details.</p>

</div>

<div id="section-paris" class="tab-content">

<h2>Product Details 2</h2>

<p>This will show you the product details. 2</p>

</div>



<div id="section-london1" class="tab-content">

<h2>Product Details 3</h2>

<p>This will show you the product details.</p>

</div>

<div id="section-paris1" class="tab-content">

<h2>Product Details 4</h2>

<p>This will show you the product details. 2</p>

</div>



<style type="text/css">

.header {

    background-color:black;

    color:white;

    text-align:center;

    padding:5px;

}

.nav {

    line-height:30px;

    background-color:#eeeeee;

    height:300px;

    width:100px;

    float:left;

    padding:5px;

}

.active {

    font-weight:bold;

}

.section {

    width:350px;

    float:left;

    padding:10px;

}

.footer {

    background-color:black;

    color:white;

    clear:both;

    text-align:center;

    padding:5px;

}


</style>

<script type="text/javascript">

$(document).ready(function () {

    $('.nav ul li:first').addClass('active');

    $('.tab-content:not(:first)').hide();

    $('.nav ul li a').click(function (event) {

        event.preventDefault();

        var content = $(this).attr('href');

        $(this).parent().addClass('active');

        $(this).parent().siblings().removeClass('active');

        $(content).show();

        $(content).siblings('.tab-content').hide();

    });

});

</script>

</body>

</html>

Comments

Popular posts from this blog

Converting JSONArray into CSV file in java

Online Book Store Website Using Java

How to read CSV File in Java