Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <style>
  6. /* Popup container - can be anything you want */
  7. .popup {
  8. position: relative;
  9. display: inline-block;
  10. cursor: pointer;
  11. -webkit-user-select: none;
  12. -moz-user-select: none;
  13. -ms-user-select: none;
  14. user-select: none;
  15. }
  16.  
  17. /* The actual popup */
  18. .popup .popuptext {
  19. visibility: hidden;
  20. width: 160px;
  21. background-color: #555;
  22. color: #fff;
  23. text-align: center;
  24. border-radius: 6px;
  25. padding: 8px 0;
  26. position: absolute;
  27. z-index: 1;
  28. bottom: 125%;
  29. left: 50%;
  30. margin-left: -80px;
  31. }
  32.  
  33. /* Popup arrow */
  34. .popup .popuptext::after {
  35. content: "";
  36. position: absolute;
  37. top: 100%;
  38. left: 50%;
  39. margin-left: -5px;
  40. border-width: 5px;
  41. border-style: solid;
  42. border-color: #555 transparent transparent transparent;
  43. }
  44.  
  45. /* Toggle this class - hide and show the popup */
  46. .popup .show {
  47. visibility: visible;
  48. -webkit-animation: fadeIn 1s;
  49. animation: fadeIn 1s;
  50. }
  51.  
  52. /* Add animation (fade in the popup) */
  53. @-webkit-keyframes fadeIn {
  54. from {opacity: 0;}
  55. to {opacity: 1;}
  56. }
  57.  
  58. @keyframes fadeIn {
  59. from {opacity: 0;}
  60. to {opacity:1 ;}
  61. }
  62. </style>
  63. </head>
  64. <script type="text/javascript">
  65. function CheckColors(val){
  66. var element=document.getElementById('color');
  67. if(val=='others'){
  68. document.getElementById("test").style.display= "block";
  69. } else {
  70. document.getElementById("test").style.display= "none";
  71. }
  72. }
  73.  
  74. </script>
  75. </head>
  76. <body>
  77. <select id="color" onchange='CheckColors(this.value);'>
  78. <option>pick a color</option>
  79. <option value="red">RED</option>
  80. <option value="blue">BLUE</option>
  81. <option value="others">others</option>
  82. </select>
  83.  
  84. <div class="form-group" id="test" style = display:none >
  85. <label>Size</label>
  86. <select class="form-control" id="size">
  87. <option value = "null">Choose a size...</option>
  88. <option value = "6">6</option>
  89. <option value = "6.5">6.5</option>
  90. <option value = "7">7</option>
  91. <option value = "7.5">7.5</option>
  92. <option value = "8">8</option>
  93. <option value = "8.5">8.5</option>
  94. <option value = "9">9</option>
  95. <option value = "9.5">9.5</option>
  96. <option value = "10">10</option>
  97. <option value = "10.5">10.5</option>
  98. <option value = "11">11</option>
  99. <option value = "11.5">11.5</option>
  100. <option value = "12">12</option>
  101. <option value = "12.5">12.5</option>
  102. <option value = "13">13</option>
  103. </select>
  104. </div>
  105.  
  106. </body>
  107. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement