Services
Portfolio
Blog
About
Contact
Login
March 20, 2008
next
3
2
1
Irocon
>
Blog
>
2008
>
March, 2008
>
March 20, 2008
Javascript: Passing 'this' to inline function
Create a new variable within the parent function:var me = this;use 'me' in new functionExample: function parentFunction() { this.message = 'Hello World!'; var me = this; var childFunction = function() { alert(me.message); } childFunction(); }
Last Updated:
Thursday, September 02, 2010
By:
alfero
#
Archives
Javascript: Passing 'this' to inline function
Contact
+1 (647) 405-0515
info@irocon.com
Copyright © 2012 Irocon. All rights reserved.
Project Inquiries
Alfero Chingono
projects@irocon.com
Quotations
Get a quote online now!
Follow Us
Twitter
Facebook
LinkedIn