dist/jBox.all.js
function ()
    {
      // Append image label containers
      this.imageLabel = jQuery('<div/>', {'class': 'jBox-image-label-container'}).appendTo(this.wrapper);
      this.imageLabel.append(jQuery('<div/>', {'class': 'jBox-image-pointer-prev', click: function () { this.showImage('prev'); }.bind(this)})).append(jQuery('<div/>', {'class': 'jBox-image-pointer-next', click: function () { this.showImage('next'); }.bind(this)}));

      // Append the download button
      if (this.options.downloadButton) {
        this.downloadButton = jQuery('<div/>', {'class': 'jBox-image-download-button-wrapper'})
          .appendTo(this.wrapper)
          .append(
            this.options.downloadButtonText ? jQuery('<div/>', {'class': 'jBox-image-download-button-text'}).html(this.options.downloadButtonText) : null
          )
          .append(
            jQuery('<div/>', {'class': 'jBox-image-download-button-icon'})
          ).on('click touchdown', function () {
            if (this.images[this.currentImage.gallery][this.currentImage.id].downloadUrl) {
              var currentImageUrl = this.images[this.currentImage.gallery][this.currentImage.id].downloadUrl;
            } else {
              var currentImage = this.wrapper.find('.jBox-image-default-current');
              var currentImageStyle = currentImage[0].style.backgroundImage;
              var currentImageUrl = currentImageStyle.slice(4, -1).replace(/["']/g, '');
            }
            this.downloadImage(currentImageUrl);
          }.bind(this));
      }

      // Creating the image counter containers
      if (this.options.imageCounter) {
        this.imageCounter = jQuery('<div/>', {'class': 'jBox-image-counter-container'}).appendTo(this.wrapper);
        this.imageCounter.append(jQuery('<span/>', {'class': 'jBox-image-counter-current'})).append(jQuery('<span/>').html(this.options.imageCounterSeparator)).append(jQuery('<span/>', {'class': 'jBox-image-counter-all'}));
      }
    }
function ()
    {
      // Append image label containers
      this.imageLabel = jQuery('<div/>', {'class': 'jBox-image-label-container'}).appendTo(this.wrapper);
      this.imageLabel.append(jQuery('<div/>', {'class': 'jBox-image-pointer-prev', click: function () { this.showImage('prev'); }.bind(this)})).append(jQuery('<div/>', {'class': 'jBox-image-pointer-next', click: function () { this.showImage('next'); }.bind(this)}));

      // Append the download button
      if (this.options.downloadButton) {
        this.downloadButton = jQuery('<div/>', {'class': 'jBox-image-download-button-wrapper'})
          .appendTo(this.wrapper)
          .append(
            this.options.downloadButtonText ? jQuery('<div/>', {'class': 'jBox-image-download-button-text'}).html(this.options.downloadButtonText) : null
          )
          .append(
            jQuery('<div/>', {'class': 'jBox-image-download-button-icon'})
          ).on('click touchdown', function () {
            if (this.images[this.currentImage.gallery][this.currentImage.id].downloadUrl) {
              var currentImageUrl = this.images[this.currentImage.gallery][this.currentImage.id].downloadUrl;
            } else {
              var currentImage = this.wrapper.find('.jBox-image-default-current');
              var currentImageStyle = currentImage[0].style.backgroundImage;
              var currentImageUrl = currentImageStyle.slice(4, -1).replace(/["']/g, '');
            }
            this.downloadImage(currentImageUrl);
          }.bind(this));
      }

      // Creating the image counter containers
      if (this.options.imageCounter) {
        this.imageCounter = jQuery('<div/>', {'class': 'jBox-image-counter-container'}).appendTo(this.wrapper);
        this.imageCounter.append(jQuery('<span/>', {'class': 'jBox-image-counter-current'})).append(jQuery('<span/>').html(this.options.imageCounterSeparator)).append(jQuery('<span/>', {'class': 'jBox-image-counter-all'}));
      }
    }
function ( ) { // Append image label containers this . imageLabel = jQuery ( '<div/>' , { 'class' : 'jBox-image-label-container' } ) . appendTo ( this . wrapper ) ; this . imageLabel . append ( jQuery ( '<div/>' , { 'class' : 'jBox-image-pointer-prev' , click : function ( ) { this . showImage ( 'prev' ) ; } . bind ( this ) } ) ) . append ( jQuery ( '<div/>' , { 'class' : 'jBox-image-pointer-next' , click : function ( ) { this . showImage ( 'next' ) ; } . bind ( this ) } ) ) ; // Append the download button if ( this . options . downloadButton ) { this . downloadButton = jQuery ( '<div/>' , { 'class' : 'jBox-image-download-button-wrapper' } ) . appendTo ( this . wrapper ) . append ( this . options . downloadButtonText ? jQuery ( '<div/>' , { 'class' : 'jBox-image-download-button-text' } ) . html ( this . options . downloadButtonText ) : null ) . append ( jQuery ( '<div/>' , { 'class' : 'jBox-image-download-button-icon' } ) ) . on ( 'click touchdown' , function ( ) { if ( this . images [ this . currentImage . gallery ] [ this . currentImage . id ] . downloadUrl ) { var currentImageUrl = this . images [ this . currentImage . gallery ] [ this . currentImage . id ] . downloadUrl ; } else { var currentImage = this . wrapper . find ( '.jBox-image-default-current' ) ; var currentImageStyle = currentImage [ 0 ] . style . backgroundImage ; var currentImageUrl = currentImageStyle . slice ( 4 , - 1 ) . replace ( / ["'] / g , '' ) ; } this . downloadImage ( currentImageUrl ) ; } . bind ( this ) ) ; } // Creating the image counter containers if ( this . options . imageCounter ) { this . imageCounter = jQuery ( '<div/>' , { 'class' : 'jBox-image-counter-container' } ) . appendTo ( this . wrapper ) ; this . imageCounter . append ( jQuery ( '<span/>' , { 'class' : 'jBox-image-counter-current' } ) ) . append ( jQuery ( '<span/>' ) . html ( this . options . imageCounterSeparator ) ) . append ( jQuery ( '<span/>' , { 'class' : 'jBox-image-counter-all' } ) ) ; } }
Triggered when jBox was created
Triggered when jBox was created