Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function ($) {
  2.  
  3.     $.fn.simplePopup = function(options) {
  4.  
  5.         var settings = $.extend({
  6.             type: "auto",
  7.             backdrop: 0.4,
  8.             backdropBackground: "#000",
  9.             injectHtml: true,
  10.             inlineCss: true
  11.         }, options );
  12.  
  13.         function init() {
  14.             startBackdrop(settings.backdrop);
  15.         }
  16.  
  17.         function startBackdrop(opacity) {
  18.             if (opacity > 1 || opacity < 0) {
  19.                 console.log("simplePopup: Please enter a \"backdrop\" value <= 1 of >= 0");
  20.                 return false;
  21.             }
  22.  
  23.             if (settings.injectHtml) {
  24.                 insertBackdropHtml(opacity);
  25.             }
  26.         }
  27.     }
  28. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement