jAlert
by HTMLGuy, LLC (https://htmlguy.com)
Demo & Detailed Docs
https://htmlguyllc.github.io/jAlert/
What is it?
Simple jQuery (Modal | Popup | Lightbox | Alert) Plugin
Whether you call it a lightbox, modal, popup, or window, jAlert is an excellent replacement / alternative for Simple Modal, FancyBox, or Reveal.
Getting the files
Available on NPM (https://www.npmjs.com/package/jAlert):
npm install jAlert
Dependencies
jQuery 1.7+
Setup
Include the CSS files from the folder in the head section:
Include the JS file from the folder before the </body>
:
<!-- COMPLETELY OPTIONAL -->
To use the 'data-jAlert' attributes, you must attach the handlers (must be re-attached for newly added dynamic content):
Click Me
;
This is the default usage. Doesn't require jAlert-functions.js
$;
Quick Use (requires jAlert-functions.js!!!)
; //override is enabled by default
Note: When you run alert() in your console, it works as expected but will return "undefined"...ignore that. It's just because the function doesn't return anything. Had to add this disclaimer because people got confused..lol..
; //green alert
; //red alert
; //blue alert
; //yellow alert
; //black alert (obviously)
; //optional second param is the image width (defaults to auto)
;
; //optional second param is onOpen callback which gets passed the instance of jAlert
; //optional second param is height (defaults to fill the viewport height)
;
$fnjAlertdefaultsbackgroundColor = 'white'; //override a default setting $fn; $fnjAlertdefaultsbackgroundColor = 'black'; //set it back to black
;
$;
$;
$;
$;
$;