What is the difference of calling function like:
testCall: function() and function testCall() in jQuery ?
Update:
Questions: Does usage of one over the another have some performance issues related to it OR it really does not matter which one you are using ?
Update 2
Also other thing that I noticed that whenn I am defining function using testCall: function() and I call it using this.testCall() it works fine and am able to call it in any other function.
But when I am using function testCall() and I try to call it using testCall() in another function than I am getting errors and am not able to call it. Is this possible or there could be some other reason for the errors ?
In this example:
testCallis now a function available on the object you’re in, like this:object.testCall()It can access other functions, properties, etc inside this object if it needs to.In this version:
testCallis just a globally available method, not scoped to the object or plugin, whatever you’re dealing with, you can call it from anywhere, like this:testCall()