functions within function? |
Saw this example on the web. What's the purpose of the two functions being contained in a function? Why would someone put that top line in there? The two functions should work without it I would think.
Code: $(function () {
It's an anonymous function: https://en.wikibooks.org/wiki/JavaScript..._Functions
Usually used (in JS) to execute something upon page load.
hi,
those are anonymous... and for the most of the time are used to group feature together... It's just like Hooks in PHP https://github.com/Blair2004/tendoo-cms/...Events.php, which can be used with anonymous function.
NexoPOS 2.6.2 available on CodeCanyon.
|
Welcome Guest, Not a member yet? Register Sign In |