PUY Modals is a javascript library function which can be used to generate Bootstrap 4 Modal Popups dynamically.
On this page I am demonstrating several types of popups that are possible with PUYMODALS. The combinations are unlimited.
Initialization code
puyModal({title:'Test Title',heading:'Heading',message:'<p>This is sample message.</p>'})
Most of the attributes can be HTML content.
Initialization code
puyModal({title:'Test Title',heading:'Heading',message:'This is sample message.',icon: 'fab fa-js-square fa-3x'})
Most of the attributes can be HTML content.
Different Possible combinations
puyModal({title:'Test Title',heading:'Heading',message:'<p>This is sample message.</p>,showHeader: false'})
Hiding the header.
puyModal({title:'Test Title',heading:'Heading',message:'<p>This is sample message.</p>,showFooter: true'})
Showing the footer.
puyModal({title:'Test Title',heading:'Heading',message:'<p>This is sample message.</p>,showHeader: false, showFooter: true'})
Hiding the header and showing the footer.
Initialization code
puyModal({title:'Load Test',loadPage:'test.html'})
It is recommended to use a page on your website for loadPage function. For external resources use Iframe
Initialization code
puyModal({title:'Iframe Test',type:'iframe',iframe:'http://pateladitya.com'})
Using Iframe for loading external content
Initialization code
puyModal({title:'Video Test',type:'video',videoSource:'youtube',embedTag:'_7XJenTvR34'})
Using Iframe loading external content
Initialization code
<button type="button" class="btn btn-primary puyVideo" data-href="YE7VzlLtp-4" data-videoSource="youtube" title="Big Buck Bunny">Youtube</button>
<a class="btn btn-primary puyVideo" href="1084537" data-videoSource="vimeo" title="Big Buck Bunny">Vimeo</a>
Using class name on buttons, anchors or any other elements to initiate a Video Popup
Vimeo