Have a question about calling one prototype function in another prototype function.
for instance lets say I have a basic slider with two prototype functions.
function Slider() {
}
Slider.prototype.transition = function() {
}
Slider.prototype.setTargets = function() {
}
What is the proper way of calling the setTargets function inside of the transition function so something like this:
Slider.prototype.transition = function() {
this.target.fadeOut('normal', function() {
// call setTargets?
this.setTargets(); // errors when i do this
});
}
thanks for the help
If
this.targetis an jQuery Object the callback offadeOutwill be called withthisas the DOMNode.Do this instead:
I have chosen the name
thatmefor all my initialized references tothis. I never usedthatmefor DomNodes, etc. makes sence for me.Please see comments for furture views on this point.
EDIT:
Acually i used
menotthat– Dont know what im thinking ?? !And for comment:
Or:
You can make a jQuery object of this:
If you need the jQuery Object of this you can refer to:
me.target