scrolly.js code understanding
hey guys i was just checking out this online pluggin , its basically a parallax plugin , a very simple one .
can somebody tell me what this bit of code from line 70 to 77 is doing , the ocde is as follows :
- $.fn[pluginName] = function ( options ) {
- return this.each(function () {
- if (!$.data(this, 'plugin_' + pluginName)) {
- $.data(this, 'plugin_' + pluginName, new Plugin( this, options ));
- }
- });
- };
and that syntex ,
$.fn[pluginName] is very unfamilier to me , sould't it be
$.fn.
$.fn.pluginName ??? or are both the same .
here is the link to the plugin code on git : github link .