Skip to content

a simple popup module for use with requirejs and similar

License

Notifications You must be signed in to change notification settings

steffchep/popup-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

popup-js

a simple popup module for use with requirejs and similar

It genreates a popup that responds to mouse clicks / taps as well as enter (confirm) or ESC (abort)

Just clone the repo and copy css and js to your project

Usage:

requirejs.config({
   paths: {
       popups: "[js-lib-path]/popups",
       ...
   }
});


...

define(['popups'], function(popups) {
   popups.alert("this is a title", "this is my message", function() {
      console.log("do this if okay is pressed");
   });
   popups.confirm("this is a title", "this is my message", function() {
      console.log("do this if 'yes' is pressed");
   }, function() {
      console.log("do this if 'no' is pressed");
   });
})

About

a simple popup module for use with requirejs and similar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published