diff --git a/jquery.simplemodal/jquery.simplemodal-tests.ts b/jquery.simplemodal/jquery.simplemodal-tests.ts new file mode 100644 index 0000000000..fc27d11c73 --- /dev/null +++ b/jquery.simplemodal/jquery.simplemodal-tests.ts @@ -0,0 +1,80 @@ +// Tests taken from documentation: http://www.ericmmartin.com/projects/simplemodal/ + +/// +/// + +// Chained call with no options +$("#sample").modal(); + +// Stand-alone call with no options +$.modal($("#sample")); + +// Enable overlay click-to-close +$("#sample").modal({overlayClose:true}); + +// Change overlay color and opacity +$("#sample").modal({ + opacity:80, + overlayCss: {backgroundColor:"#fff"} +}); + +// Disable focus (allows tabbing away from dialog) +$("#sample").modal({focus:false}); + +// Change min height and width +$("#sample").modal({ + minHeight:400, + minWidth: 600 +}); + +// Manually set position +$("#sample").modal({position: [10,10]}); + +// Manually set position using percentages +$("#sample").modal({position: ["50%","50%"]}); + +// Display an external page using an iframe +var src = "http://365.ericmmartin.com/"; +$.modal('