what will be the java script code

0 replies
  • WEB DESIGN
  • |
Need help with the pop up script code in .js for bootstrap.

Will this code work for image gallery.


$(document).ready(function () {

var popup = $("#popup"),
doc = $(document),
popClass = "popped",
showPopup = function (event) {
popup.fadeIn(200);
event.preventDefault();
},
hidePopup = function (event) {
popup.hide();
event.preventDefault();
};

doc.on("click", "#open-popup", showPopup);
doc.on("click", ".popup__close", hidePopup);

doc.keypress(function (event) {
if (event.keyCode === 27) { // esc key
hidePopup();
}
});

});
#code #java #script
Avatar of Unregistered

Trending Topics