src/jquery.sticky-sidebar.js
function _jQueryPlugin(config){
      return this.each(function(){
        var $this = plugin(this),
          data = plugin(this).data(DATA_NAMESPACE);

          if( ! data ){
            data = new StickySidebar(this, typeof config == 'object' && config);
            $this.data(DATA_NAMESPACE, data);
          }

          if( 'string' === typeof config){
            if (data[config] === undefined && ['destroy', 'updateSticky'].indexOf(config) === -1)
              throw new Error('No method named "'+ config +'"');

            data[config]();
          }
      });
    }
function _jQueryPlugin(config){
      return this.each(function(){
        var $this = plugin(this),
          data = plugin(this).data(DATA_NAMESPACE);

          if( ! data ){
            data = new StickySidebar(this, typeof config == 'object' && config);
            $this.data(DATA_NAMESPACE, data);
          }

          if( 'string' === typeof config){
            if (data[config] === undefined && ['destroy', 'updateSticky'].indexOf(config) === -1)
              throw new Error('No method named "'+ config +'"');

            data[config]();
          }
      });
    }
function _jQueryPlugin ( config ) { return this . each ( function ( ) { var $this = plugin ( this ) , data = plugin ( this ) . data ( DATA_NAMESPACE ) ; if ( ! data ) { data = new StickySidebar ( this , typeof config == 'object' && config ) ; $this . data ( DATA_NAMESPACE , data ) ; } if ( 'string' === typeof config ) { if ( data [ config ] === undefined && [ 'destroy' , 'updateSticky' ] . indexOf ( config ) === - 1 ) throw new Error ( 'No method named "' + config + '"' ) ; data [ config ] ( ) ; } } ) ; }
Sticky Sidebar Plugin Defintion.
@param {Object|String} - config
Sticky Sidebar Plugin Defintion .