Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 220
/** * Theme: Velonic Admin Template * Author: Coderthemes * Chat application */ !function($) { "use strict"; var ChatApp = function() { this.$body = $("body"), this.$chatInput = $('.chat-input'), this.$chatList = $('.conversation-list'), this.$chatSendBtn = $('.chat-send .btn') }; //saves chat entry - You should send ajax call to server in order to save chat enrty ChatApp.prototype.save = function() { var chatText = this.$chatInput.val(); var chatTime = moment().format("h:mm"); if (chatText == "") { sweetAlert("Oops...", "You forgot to enter your chat message", "error"); this.$chatInput.focus(); } else { $('
  • male' + chatTime + '
    John Deo

    ' + chatText + '

  • ').appendTo('.conversation-list'); this.$chatInput.val(''); this.$chatInput.focus(); this.$chatList.scrollTo('100%', '100%', { easing: 'swing' }); } }, ChatApp.prototype.init = function () { var $this = this; //binding keypress event on chat input box - on enter we are adding the chat into chat list - $this.$chatInput.keypress(function (ev) { var p = ev.which; if (p == 13) { $this.save(); return false; } }); //binding send button click $this.$chatSendBtn.click(function (ev) { $this.save(); return false; }); }, //init ChatApp $.ChatApp = new ChatApp, $.ChatApp.Constructor = ChatApp }(window.jQuery);