Hi Shyam,
You can modify the following code -
$(this._element).append('<input value="close" type="button" önclick="'+obj+'.quit('+obj._roomid+');" />');
var obj = this;
$(this._element).show();
And, rewrite as -
var obj = this;
var $tempCloseButton = $('<input value="close" type="button" />');
$tempCloseButton.on('click', function(e){
obj.quit(obj._roomid)
e.preventDefault();
});
$(this._element).append($tempCloseButton);
$(this._element).show();
I hope this will help.
Thanks