chat.js 865 B

1234567891011121314151617181920212223242526272829303132333435
  1. $(function() {
  2. $('.sec_scroll').niceScroll({
  3. cursorborder : "",
  4. cursorcolor : "#cccdd1"
  5. });// 聊天消息框
  6. $('.face_include').niceScroll({
  7. cursorborder : "",
  8. cursorcolor : "#cccdd1"
  9. });// 表情弹出层
  10. $('.exp_boxer').on('click', 'i[data-class="icon-face"]', function(event) {// 表情
  11. event.stopPropagation();
  12. $('.face_include').toggle();
  13. })
  14. $('body,html').bind('click', function() {
  15. $('.face_include').hide();
  16. })
  17. $('.input_boxer input').each(function(index, element) { // 登陆页input效果
  18. var $this = $(this), word = $this.val();
  19. $this.bind('focus', function() {
  20. $this.parent('.input_boxer').addClass('focus');
  21. $this.val('');
  22. }).bind('blur', function() {
  23. $this.parent('.input_boxer').removeClass('focus');
  24. if ($this.val() == '') {
  25. $this.val(word);
  26. } else {
  27. return;
  28. }
  29. })
  30. });
  31. // 表情END
  32. })