Skip to content

Instantly share code, notes, and snippets.

@johnkpaul
Created March 15, 2012 01:33
Show Gist options
  • Save johnkpaul/2041051 to your computer and use it in GitHub Desktop.
Save johnkpaul/2041051 to your computer and use it in GitHub Desktop.
(function($,window, undefined){
var pluginName = "stickyScroll",
defaults = {
"class":"scrolled-off"
}
function Plugin( element, options ) {
this.element = element;
this.options = $.extend( {}, defaults, options) ;
this._defaults = defaults;
this.init();
}
Plugin.prototype.init = function(){
}
$.fn.stickyScroll = function(options){
return this.each(function(){
if (!$.data(this, 'plugin_' + pluginName)) {
$.data(this, 'plugin_' + pluginName,
new Plugin( this, options ));
}
});
}
})(window.jQuery,window)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment