dist/jBox.all.js
function ()
    {
      // Cache position values
      this.defaultNoticePosition = jQuery.extend({}, this.options.position);

      // Type Notice has its own adjust position function
      this._adjustNoticePositon = function () {
        var win = jQuery(window);
        var windowDimensions = {
          x: win.width(),
          y: win.height()
        };

        // Reset default position
        this.options.position = jQuery.extend({}, this.defaultNoticePosition);

        // Adjust depending on viewport
        jQuery.each(this.options.responsivePositions, function (viewport, position) {
          if (windowDimensions.x <= viewport) {
            this.options.position = position;
            return false;
          }
        }.bind(this));

        // Set new padding options
        this.options.adjustDistance = {
          top: this.options.position.y,
          right: this.options.position.x,
          bottom: this.options.position.y,
          left: this.options.position.x
        };
      };

      // If jBox grabs an element as content, crab a clone instead
      this.options.content instanceof jQuery && (this.options.content = this.options.content.clone().attr('id', ''));

      // Adjust paddings when window resizes
      jQuery(window).on('resize.responsivejBoxNotice-' + this.id, function (ev) { if (this.isOpen) { this._adjustNoticePositon(); } }.bind(this));

      this.open();
    }
function ()
    {
      // Cache position values
      this.defaultNoticePosition = jQuery.extend({}, this.options.position);

      // Type Notice has its own adjust position function
      this._adjustNoticePositon = function () {
        var win = jQuery(window);
        var windowDimensions = {
          x: win.width(),
          y: win.height()
        };

        // Reset default position
        this.options.position = jQuery.extend({}, this.defaultNoticePosition);

        // Adjust depending on viewport
        jQuery.each(this.options.responsivePositions, function (viewport, position) {
          if (windowDimensions.x <= viewport) {
            this.options.position = position;
            return false;
          }
        }.bind(this));

        // Set new padding options
        this.options.adjustDistance = {
          top: this.options.position.y,
          right: this.options.position.x,
          bottom: this.options.position.y,
          left: this.options.position.x
        };
      };

      // If jBox grabs an element as content, crab a clone instead
      this.options.content instanceof jQuery && (this.options.content = this.options.content.clone().attr('id', ''));

      // Adjust paddings when window resizes
      jQuery(window).on('resize.responsivejBoxNotice-' + this.id, function (ev) { if (this.isOpen) { this._adjustNoticePositon(); } }.bind(this));

      this.open();
    }
function ( ) { // Cache position values this . defaultNoticePosition = jQuery . extend ( { } , this . options . position ) ; // Type Notice has its own adjust position function this . _adjustNoticePositon = function ( ) { var win = jQuery ( window ) ; var windowDimensions = { x : win . width ( ) , y : win . height ( ) } ; // Reset default position this . options . position = jQuery . extend ( { } , this . defaultNoticePosition ) ; // Adjust depending on viewport jQuery . each ( this . options . responsivePositions , function ( viewport , position ) { if ( windowDimensions . x <= viewport ) { this . options . position = position ; return false ; } } . bind ( this ) ) ; // Set new padding options this . options . adjustDistance = { top : this . options . position . y , right : this . options . position . x , bottom : this . options . position . y , left : this . options . position . x } ; } ; // If jBox grabs an element as content, crab a clone instead this . options . content instanceof jQuery && ( this . options . content = this . options . content . clone ( ) . attr ( 'id' , '' ) ) ; // Adjust paddings when window resizes jQuery ( window ) . on ( 'resize.responsivejBoxNotice-' + this . id , function ( ev ) { if ( this . isOpen ) { this . _adjustNoticePositon ( ) ; } } . bind ( this ) ) ; this . open ( ) ; }
Triggered when notice is initialized
Triggered when notice is initialized