(function( $ ) {
var TagHolder = function(element,options){
this.property1 = options.p1;
this.id = 0;
this.init = function(){
$('a').on('click',function(e){
e.preventDefault();
var id = $(this).attr('id');
this.id = id;
});
}
}
$.fn.TagHolderProperty = function(options) {
return new TagHolder(this, options);
}
})( window.jQuery );
How can I access this
object instance in line this.property1 = options.p1;
from line this.id = id;
so I can set the id property?