Execute a event manually in javascript
I have a class:
function x()
{
this.initialize = function () { }
this.filterSelection = function (event, ui) { /* code */ }
}
I hook filterSelection method to other items through:
$(item).on("click", this, this.filterSelection );
When filterSelection is called, the event.data points to the instance of
my class.
Now I need to call filterSelection manually from within the initialize()
method.
How can I do this which setting the correct parameters?
No comments:
Post a Comment