Not sure about this style of jQuery/Javascript proramming.

Im wanting to do a tutorial for my blog/portfolio site and I realized that... For all I know about this particular method of jQuery/Javascript programming, I do not know what to call it or what other people call it. I know its a particular method of OOP and the person who showed me how to do this referred to it as "Prototyping". But when searching for it on google, im not finding anything similar. Here is condensed example: jQuery().ready(function() { site.internal.page = function () { return { init: function () { var that = this; }, business: function () { return { init: function () { }, doSomething: function () { }, addSomething: function (r) { }, makeSomethign: function () { } } }(), invoice: function () { return { init: function () { that = this; }, addItem: function (row) { } } }() } }(); site.internal.page.init(); }); Can anyone assist me in figuring out what to refer to this as. Im not sure if its the same as making a library or a plug-in, but id really like to figure it out. Thanks.
There are many things going on there, which one are you referring to?

以上就是Not sure about this style of jQuery/Javascript proramming.的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏