1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Adding onbeforeunload-event

This commit is contained in:
Tim Düsterhus 2011-12-02 23:16:55 +01:00
parent c6184376c5
commit 46c063085d

View File

@ -13,9 +13,16 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
(function ($, document) { (function ($, document) {
TimWolla.WCF.Chat = { TimWolla.WCF.Chat = {
init: function(roomID, messageID) { init: function(roomID, messageID) {
this.bindEvents();
},
bindEvents: function() {
$('.smiley').click(function(event) { $('.smiley').click(function(event) {
alert($(event.target).attr('alt')); alert($(event.target).attr('alt'));
}); });
$(window).bind('beforeunload', function() {
return false;
});
} }
}; };
})(jQuery, document); })(jQuery, document);