admin管理员组文章数量:1435859
I can't find a definitive answer if an init function is called automatically when the file is loaded. Is this a built-in part of JS/Jquery, or am I missing where it's getting called from in some location of another file?
If it is being called automatically, is this reoccurring every time the file is loaded?
Example of the particular setup:
ExampleClass = function()
{
this.init = function()
{
//...
}
}
I can't find a definitive answer if an init function is called automatically when the file is loaded. Is this a built-in part of JS/Jquery, or am I missing where it's getting called from in some location of another file?
If it is being called automatically, is this reoccurring every time the file is loaded?
Example of the particular setup:
ExampleClass = function()
{
this.init = function()
{
//...
}
}
Share
Improve this question
asked Sep 23, 2011 at 14:34
BrizBriz
1751 gold badge2 silver badges12 bronze badges
1
- 2 in your example there is no code ever being called, only defined. – zzzzBov Commented Sep 23, 2011 at 14:35
3 Answers
Reset to default 4no init is not called automatically when file is loaded.
Something else is calling it, that is not a behavior of javascript.
Init is called when DOM is ready, not called default or automatically when file is loaded.
Please see below link for more understanding.You will definitely like it.
Click me
本文标签: javascriptIs thisinitfunction() called every time file is loadedStack Overflow
版权声明:本文标题:javascript - Is this.init = function() called every time file is loaded? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745668623a2669433.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论