Create a simple widget|On image click pop-up window

To create pop-up window on image click following code should be used:
Here I have used css to animate the image.
If animation is not required “.element{” style should be removed

DEMO:http://nkworlds.com/ [click on the smiley at the left hand side corner of the page] 
=======================================================

<!DOCTYPE html>
<html>
<head>
<style>
/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    -webkit-animation-name: animatetop;
    -webkit-animation-duration: 0.4s;
    animation-name: animatetop;
    animation-duration: 0.4s
}

/* Add Animation */
@-webkit-keyframes animatetop {
    from {top:-300px; opacity:0}
    to {top:0; opacity:1}
}

@keyframes animatetop {
    from {top:-300px; opacity:0}
    to {top:0; opacity:1}
}

/* The Close Button */
.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-header {
    padding: 2px 16px;
    background-color: #E74C3C;
    color: white;
}

.modal-body {padding: 2px 16px;}

.modal-footer {
    padding: 2px 16px;
    background-color: #E74C3C;
    color: white;
}

.element

position:fixed; top:90%; left:2%; 
    padding: 10px;
-webkit-animation-name: bounce;
  animation-name: bounce;
  -webkit-transform-origin: center bottom;
  -ms-transform-origin: center bottom;
  transform-origin: center bottom;
  -webkit-animation-duration:3s;
  animation-duration:3s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
  animation-iteration-count:infinite;
  }
  @-webkit-keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
  -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
  }
  40%, 43% {
  -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
  transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
  -webkit-transform: translate3d(0, -30px, 0);
  transform: translate3d(0, -30px, 0);
  }
  70% {
  -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
  transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
  -webkit-transform: translate3d(0, -15px, 0);
  transform: translate3d(0, -15px, 0);
  }
  90% {
  -webkit-transform: translate3d(0,-4px,0);
  transform: translate3d(0,-4px,0);
  }
  }
  
  @keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
  -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
  }
  40%, 43% {
  -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
  transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
  -webkit-transform: translate3d(0, -30px, 0);
  transform: translate3d(0, -30px, 0);
  }
  70% {
  -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
  transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
  -webkit-transform: translate3d(0, -15px, 0);
  transform: translate3d(0, -15px, 0);
  }
  90% { -webkit-transform: translate3d(0,-4px,0); transform: translate3d(0,-4px,0);
  }

}
</style>
</head>
<body>


<!– HTML CODE :Trigger/Open The Modal //replace with your image name–>
<div class=”element”>
<img id=”myBtn” src=”images/happy.png” width=”50″ height=”50″>
</div>
<!– The Modal –>
<div id=”myModal” class=”modal”>

  <!– Modal content –>
  <div class=”modal-content”>
    <div class=”modal-header”>
      <span class=”close”>x</span>
      <h4>Your Feedback Is Valuable</h4>
    </div>
    <div class=”modal-body”>
      <p>  <form action=”action_page.php”>
    <label for=”fname”>Name</label>
    <input type=”text” id=”fname” name=”firstname”>

    <label for=”lname”>Email</label>
    <input type=”text” id=”lname” name=”lastname”>

    <label for=”feedback”>Feedback</label>
<br>
    <textarea name=”feedback” style=”width:100%” rows=”4″>
</textarea>
  <br><br>
    <input type=”submit” value=”Submit”>
  </form></p>
    </div>
    <div class=”modal-footer”>
<h3></h3>
    </div>
  </div>

</div>

<script>
// JAVASCRIPT CODE
//Get the modal
var modal = document.getElementById(‘myModal’);

// Get the button that opens the modal
var btn = document.getElementById(“myBtn”);

// Get the <span> element that closes the modal
var span = document.getElementsByClassName(“close”)[0];

// When the user clicks the button, open the modal
btn.onclick = function() {
    modal.style.display = “block”;
}

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
    modal.style.display = “none”;
}

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = “none”;
    }
}
</script>

</body>
</html>

319 thoughts on “Create a simple widget|On image click pop-up window

  1. Pingback: Google
  2. Pingback: adam and eve dildo
  3. Pingback: brazzers porn
  4. Pingback: Sex Toys
  5. Pingback: Mom
  6. Pingback: anal sex toys
  7. Pingback: 188bet
  8. Pingback: vacuum penis pump
  9. Pingback: sekscamera
  10. Pingback: pc games download
  11. Pingback: cameras ao vivo
  12. Pingback: anal butt plugs
  13. Pingback: play online games
  14. Pingback: best couples toys
  15. Pingback: Indiatimes
  16. Pingback: cursos gratuitos
  17. Pingback: dani daniels
  18. Pingback: dick toys
  19. Pingback: rampant rabbit
  20. Pingback: sexe webcam
  21. Pingback: shemale dating
  22. Pingback: sexe webcam
  23. Pingback: rencontres coquin
  24. Pingback: prostate orgasm
  25. Pingback: thrusting vibrator
  26. Pingback: vaginal dildo
  27. Pingback: 8 inch dong
  28. Pingback: sex toy store
  29. Pingback: erotic sex toys
  30. Pingback: enema valve
  31. Pingback: training buttplugs
  32. Pingback: rich push
  33. Pingback: p8z68v pro manual
  34. Pingback: penis pumps
  35. Pingback: dual cock ring
  36. Pingback: best dildos
  37. Pingback: best ben wa balls
  38. Pingback: big dildo selfie
  39. Pingback: g gasm rabbit
  40. Pingback: vibrating kegels
  41. Pingback: satta king
  42. Pingback: vibrating bullet
  43. Pingback: realistic vagina
  44. Pingback: female vibrator
  45. Pingback: best double dong
  46. Pingback: g gasm curve
  47. Pingback: bum plugs
  48. Pingback: bondage restraints
  49. Pingback: porn city
  50. Pingback: pornland
  51. Pingback: fantasy cock ring
  52. Pingback: luxury vibrator
  53. Pingback: jockstrap thong
  54. Pingback: gay sucking penis
  55. Pingback: kitchens designs
  56. Pingback: European
  57. Pingback: sex toys for men
  58. Pingback: bunny vibrator
  59. Pingback: bondage
  60. Pingback: new vibrators
  61. Pingback: vibrating panty
  62. Pingback: light bondage
  63. Pingback: Pen kopen
  64. Pingback: sexy stocking
  65. Pingback: hundekurv tilbud
  66. Pingback: Bandar Ceme Online
  67. Pingback: Julia Ann
  68. Pingback: bdjobs cv format
  69. Pingback: Pakistani Suits
  70. Pingback: Pakistani Suits
  71. Pingback: sexboer
  72. Pingback: porno files
  73. Pingback: geile sex filmpjes
  74. Pingback: gratis films
  75. Pingback: pornofilmpjes
  76. Pingback: iptv free tv
  77. Pingback: diy sex toys
  78. Pingback: liteblue.usps.gov
  79. Pingback: neon 7 inch dildo
  80. Pingback: wekend getaway
  81. Pingback: Penis Pump Review
  82. Pingback: hundesnor
  83. Pingback: nipple orgasm
  84. Pingback: beeg bbw
  85. Pingback: huge dildos
  86. Pingback: cairo massage
  87. Pingback: onewalmartwire.com
  88. Pingback: Bluechew reviews
  89. Pingback: ormekur til hvalpe
  90. Pingback: type 1 diabetes
  91. Pingback: powerful vibrator
  92. Pingback: bondage experience
  93. Pingback: SUC Elibrary
  94. Pingback: bondage toys
  95. Pingback: سكس خلفي hd
  96. Pingback: finger sex
  97. Pingback: podcast
  98. Pingback: poker indonesia
  99. Pingback: true feel dildo
  100. Pingback: testicle rings
  101. Pingback: Gmail sign in
  102. Pingback: hasta yatağı
  103. Pingback: hot jockstraps
  104. Pingback: turtle bracelet
  105. Pingback: AGF ultras
  106. Pingback: cock ring
  107. Pingback: MIDE-676
  108. Pingback: free porn
  109. Pingback: gay male sex toys
  110. Pingback: Yt Mp3
  111. Pingback: walmartone
  112. Pingback: websites
  113. Pingback: Small doctor
  114. Pingback: ssni 550
  115. Pingback: pppd 785
  116. Pingback: rabbit vibrator
  117. Pingback: shopping challenge
  118. Pingback: extreme vibrator
  119. Pingback: need more likes
  120. Pingback: south coast seo
  121. Pingback: Ghana Music
  122. Pingback: gay dildo riding
  123. Pingback: anal douching
  124. Pingback: 192.168.1.1 admin
  125. Pingback: video downloader
  126. Pingback: CAWD-004
  127. Pingback: mynordstrom portal
  128. Pingback: boy in jockstraps
  129. Pingback: easy guitar solo
  130. Pingback: male masturbator
  131. Pingback: apps for pc
  132. Pingback: full apps download
  133. Pingback: Boston Car Service
  134. Pingback: Eweka
  135. Pingback: virgin coconut oil
  136. Pingback: walmartone login
  137. Pingback: العاب طبخ
  138. Pingback: 710 king pen
  139. Pingback: Dank Vapes
  140. Pingback: Dank Vapes
  141. Pingback: Chat Teen Live
  142. Pingback: cakes
  143. Pingback: marketing
  144. Pingback: Baccarat Strategy
  145. Pingback: ABP 899
  146. Pingback: runelite
  147. Pingback: my gift card site
  148. Pingback: MEYD 532
  149. Pingback: Artsy t shirts
  150. Pingback: Women clothing
  151. Pingback: 618media.com
  152. Pingback: nba
  153. Pingback: adam and eve haul
  154. Pingback: Startups
  155. Pingback: Target Schedule
  156. Pingback: properties USA
  157. Pingback: jockstraps for gay
  158. Pingback: top bondage toys
  159. Pingback: bondage restraints
  160. Pingback: best lube for anal
  161. Pingback: Judi Slot Online
  162. Pingback: IPX-366
  163. Pingback: purchase bitcoin
  164. Pingback: onewalmart
  165. Pingback: penis masturbator
  166. Pingback: SEO Vancouver
  167. Pingback: HUNTA 656
  168. Pingback: sex toys for her

Leave a Reply