Within my class I store a reference to a jquery element within the instance variable and point the element's "click event" to my member function. Within the member function i try to reference the instance variable with the "this" keyword. Of course jquery has overridden "this" preventing me from accessing the instance object and its member variables.
// Constructor
function MyClass { // Store our JQ objects this.Dropdown = $("#tld_list");
// Set the click event this.Dropdown.click(this.on_Dropdown_Click); }
// Member Function MyClass.prototype.on_Dropdown_Click = function() { this.Dropdown.addClass("yellow");
this.doTask(); }
// Member Function
MyClass.prototype.doTask =
function()
{
this.DropDown.fadeIn();
}
Is it possible to access instance member variables / functions from within an instance function which has been called by jQ?
If the user clicks the X button in the top right corner i was hoping the close event would be fired but it doesnt. Any ideas why and how do i set an event on it so that i know when the dialog has closed, be it thru the ESC key or the X. What is the purpose of this "close" option if it doesnt work?
I would like to scroll the window to a document element but have the scrolling done with an Ease In / Out. No linear, no bouncing, just a simple ease in + ease out.
Is there a plugin for scrolling to a document element with simple easing?