I'm using Mootools and I have two classes (class1, class2), class2 is used in class1
class2 get two methods (func1, func2)
func1 is used to display elements and is call in class1
func2 is used is one of the func1 displayed element is clicked.
I'd like to get an event in class1 if func2 is called but I don't know how.
Thanks for your help.
Edit: some code example
var Class1 = function(){
var class2 = new Class2();
class2.func1();
class2.onElementsHide(function(){
alert('elements are invisibles !!')
});
}
var Class2 = function(){
this.func1 = function(){
//show elements
elementOnClick(this.func2)
}
this.func2 = function(){
//hide elements
}
this.onElementsHide = function(callback){
//trigger callback when func2 is used
}
}