stargateatlantis
asked on
convert this namespace into jQuery
I have the following code but how would you convert it into a jQuery namespace
JQUERY4U = {
multiply: function(x,y) {
return (x * y);
}
}
//function call
JQUERY4U.multiply(2,2);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
or you can declare your new method as:
Open in new window
Note: The first alternative is more flexible and reusable as discussed below:
http://richardneililagan.com/2011/07/using-jquery-extend-to-make-even-more-powerful-cached-objects/