js-overlay
v1.3.0
Published
JS library that lets user to view image gallery, content, iframe content and ajax content in modal box
Downloads
28
Readme
JS library that lets user to view image gallery, content, iframe content and ajax content in modal box
🏠 Homepage
✨ Demo
Install
npm i js-overlay
Script Tag
Download and include file
<script type:"text/javascript" src="js-overlay.js"></script>
or
<script type:"text/javascript" src="js-overlay.min.js"></script>
Or Use CDN
<script src="
https://cdn.jsdelivr.net/npm/[email protected]/js-overlay.min.js
"></script>
Initialization
const overlay = new jsOverlay();
For Content viewer
overlay.createOverlay({
elContent:'String', (String, content to be loaded in modal)
containerHt: Number, (Number, Modal height.Default 500)
containerWd: Number, (Number, Modal Width.Default 650)
})
For Image viewer
overlay.createOverlay({
imgGallery:'Selector/s', (String, parent container selector/s of Image/s)
containerHt: Number, (Number, Modal height.Default 500)
containerWd: Number, (Number, Modal Width.Default 650)
})
For Iframe viewer
overlay.createOverlay({
iframeUrl:'String', (String, URL of page to be loaded)
containerHt: Number, (Number, Modal height.Default 500)
containerWd: Number, (Number, Modal Width.Default 650)
})
For AJAX viewer
overlay.createOverlay({
ajaxUrl: 'String',(String, Url Where data to be sent and get reponse from )
ajaxData: 'String',(String, Data to be sent to server)
ajaxMethod: 'String': (String, GET or POSt method, default GET )
containerHt: Number, (Number, Modal height.Default 500)
containerWd: Number, (Number, Modal Width.Default 650)
})
Author
👤 UjW0L
- Website: http://ujw0l.github.io
- Twitter: @bastakotiujwol
- Github: @UjW0L
- LinkedIn: @ujwol-bastakoti-2453a4169
🤝 Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!