Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script>
- <style type='text/css'>
- .block{
- background: #333333;
- color: #fcfcfc;
- width: 800px;
- padding: 5px;
- margin:5px 0px 0px 0px;
- border: 2px #fff;
- }
- </style>
- <script type='text/javascript'>//<![CDATA[
- $(window).load(function(){
- $(document).ready(function () {
- $('.block').hide();
- $('#option1').show();
- $('#selectField').change(function () {
- $('.block').hide();
- $('#'+$(this).val()).fadeIn();
- });
- });
- });//]]>
- </script>
- </head>
- <body>
- <center>
- <button type="button" id="prev">Previous</button>
- <select id="selectField" style="padding-left: 20px;width:150px">
- <option value="option1">Lion</option>
- <option value="option2">DOG </option>
- <option value="option3">Cat</option>
- <option value="option4">Lion</option>
- </select>
- <button type="button" id="next">Next</button>
- <div id="option1" class="block"></div>
- <div id="option2" class="block">DOG </div>
- <div id="option3" class="block">Cat </div>
- <div id="option4" class="block">Mouse</div>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement