Modal content presentation for your website. View the page source for now, documentation forthcoming…
var m = new Modal({ {youtube|vimeo|node|selector|html|xhr|video}: value, // optional params z: {index}, // force modal to appear above other elements with z-index applied // optional params for youtube & vimeo: autoplay: {true|false}, // autoplay videos size: { width: [px], height: [px] }, // aspect ratio of the video to properly size dialog // optional event handlers which are invoked at relevant time(s) on: { show: function(params) { }, remove: function(params) { } } }); m.show(); // display dialog // … m.remove(); // remove dialog
View the JavaScript for the modal examples above.
YouTube & Vimeo videos can be presented via their video IDs or the entire URL for the video, ex:
{ youtube: 'sNaR1JRNayU' } { youtube: 'https://www.youtube.com/watch?v=LAh6_Ba26l8' } { vimeo: 175289264 } { vimeo: 'http://player.vimeo.com/video/244264989' }
TODO
This modal is populated via a node that exists in the HTML document.
Lorem
Lorem
Lorem
Lorem
Lorem
Lorem
Lorem
Lorem
Lorem
Lorem
This modal is populated via a query selector for a node that exists in the HTML document.