javascript - What is variable f supposed to contain in this example? -
I try to see what the logic behind the jQuery plugin is, and I'm stacking up with the following problem.
I have the following code, and I can not determine the variable should have a reference in the function Does anyone Help me with I'm completely confused with it. It looks like the function Therefore, f inside variable
t = function (u, a) {}
(function ($) {$ .fn.pluginName = function (userOptions) {... if ((typeof userOptions) .mail ("object | undefined")) {this return .Each (function (e) {new t (this, user option)}}} t = function (u, a) {var f = this;} ...}}) (jquery)
t or it should have a reference on
pluginName
T is the constructor function, which means that
this inside the function will refer to the example that is applied to the code by the
new keyword. / P>
f will reference an example of an object whose constructor function is
t .
Comments
Post a Comment