Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <style>
- /* Popup container - can be anything you want */
- .popup {
- position: relative;
- display: inline-block;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- }
- /* The actual popup */
- .popup .popuptext {
- visibility: hidden;
- width: 160px;
- background-color: #555;
- color: #fff;
- text-align: center;
- border-radius: 6px;
- padding: 8px 0;
- position: absolute;
- z-index: 1;
- bottom: 125%;
- left: 50%;
- margin-left: -80px;
- }
- /* Popup arrow */
- .popup .popuptext::after {
- content: "";
- position: absolute;
- top: 100%;
- left: 50%;
- margin-left: -5px;
- border-width: 5px;
- border-style: solid;
- border-color: #555 transparent transparent transparent;
- }
- /* Toggle this class - hide and show the popup */
- .popup .show {
- visibility: visible;
- -webkit-animation: fadeIn 1s;
- animation: fadeIn 1s;
- }
- /* Add animation (fade in the popup) */
- @-webkit-keyframes fadeIn {
- from {opacity: 0;}
- to {opacity: 1;}
- }
- @keyframes fadeIn {
- from {opacity: 0;}
- to {opacity:1 ;}
- }
- </style>
- </head>
- <script type="text/javascript">
- function CheckColors(val){
- var element=document.getElementById('color');
- if(val=='others'){
- document.getElementById("test").style.display= "block";
- } else {
- document.getElementById("test").style.display= "none";
- }
- }
- </script>
- </head>
- <body>
- <select id="color" onchange='CheckColors(this.value);'>
- <option>pick a color</option>
- <option value="red">RED</option>
- <option value="blue">BLUE</option>
- <option value="others">others</option>
- </select>
- <div class="form-group" id="test" style = display:none >
- <label>Size</label>
- <select class="form-control" id="size">
- <option value = "null">Choose a size...</option>
- <option value = "6">6</option>
- <option value = "6.5">6.5</option>
- <option value = "7">7</option>
- <option value = "7.5">7.5</option>
- <option value = "8">8</option>
- <option value = "8.5">8.5</option>
- <option value = "9">9</option>
- <option value = "9.5">9.5</option>
- <option value = "10">10</option>
- <option value = "10.5">10.5</option>
- <option value = "11">11</option>
- <option value = "11.5">11.5</option>
- <option value = "12">12</option>
- <option value = "12.5">12.5</option>
- <option value = "13">13</option>
- </select>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement