Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-15-2011, 04:54 PM   PM User | #1
styks1987
New to the CF scene

 
Join Date: Aug 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
styks1987 is an unknown quantity at this point
Mootools 1.3 Classes and Binding

I am having trouble accessing both the Class and the current element. How can I have access to both the current element and the Class?


// Class stuff above
fuction1 : function () {
myelements.addEvent('click', this.function2);
},
function2 : function () {
// "this" is the element from function1
this.getParent('div')

// now I need to call another function
// But since the scope is the element, I get an error
// If I bind function two,
// how can I gain access to the element?
this.function3();
}
//Class stuff below


Thanks!
styks1987 is offline   Reply With Quote
Reply

Bookmarks

Tags
bind, classes, mootools, variable scope

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:41 AM.


Advertisement
Log in to turn off these ads.