good day
Already a lot of work with jQuery. But now there is a periodic question about the creation of plug-ins. Namely, the question about the events.
If, let's say, we have an example:
test= function(options) { this.init(options); }; $.extend(test.prototype, { init: function() { } });
Question: if in the init
method and select a DOM
element and assign it a click
event. Those. Is there an acceptable way for the method of the test
object to be the event handler and for the initialized object to be preserved? That through this
methods test
and all its properties were accessible to me.
Thank.