Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>Testy</title>
- <style type="text/css">
- .box{
- color: #000000;
- padding: 0px;
- display: none;
- margin-top: 0px;
- background-color: #ffffff;
- text-align: center;
- }
- </style>
- <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $("select").change(function(){
- $(this).find("option:selected").each(function(){
- var optionValue = $(this).attr("value");
- if(optionValue){
- $(".box").not("." + optionValue).hide();
- $("." + optionValue).show();
- } else{
- $(".box").hide();
- }
- });
- }).change();
- });
- </script>
- </head>
- <body>
- <div>
- <select>
- <option>Wybierz substancje</option>
- <option value="1">LSD</option>
- </select>
- </div>
- <div class="1 box">
- <a href="http://sin.org.pl" target="_blank">
- <img src="https://s14.postimg.org/s15q8k3u9/Untitled-1.jpg" />
- </a>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement