Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!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" lang="EN">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>TEST</title>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
- <script>
- $(document).ready(function () {
- $('.group').hide();
- $('#option1').show();
- $('#selectMe').change(function () {
- $('.group').hide();
- $('#'+$(this).val()).show();
- })
- });
- </script>
- </head>
- <body>
- <div id="option1" class="group">asdf</div>
- <div id="option2" class="group">kljh</div>
- <div id="option3" class="group">zxcv</div>
- <div id="option4" class="group">qwerty</div>
- <select id="selectMe">
- <option value="option1">option1</option>
- <option value="option2">option2</option>
- <option value="option3">option3</option>
- <option value="option4">option4</option>
- </select>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement