Error in QuickReply JQuery Code

  Bài viết hay nhất1
i'm trying to write a code make QuickReply popup when click on ADD REPLY IMG

Problem:
smiley-box and sceditor doesn't appear
preview img:

code:
Code:
$(function() {
  var postURL = $(".i_post").parent().attr("href"),
      replyURL = $(".i_reply").parent().attr("href");
 
      $('head').prepend('<style>div#quickreplyform_overlay{background-color:#333;height:100%;right:0;opacity:.7;position:fixed;top:0;width:100%;z-index:9999999}#quickreplyform{background: #FFF;position:fixed;border-radius: 5px;box-shadow: 2px 2px 10px #333;z-index:99999999;width:500px;right:50%;margin-right:-250px;top:20%;height:410px;overflow:auto}</style>');
 

    $('#content-container #main-content').prepend('<div id="quickreplyform" style="display:none;"><img src="https://i62.servimg.com/u/f62/18/32/73/91/loadin10.gif"/></div><div id="quickreplyform_overlay" style="display:none;"></div>');

    $('.i_reply').click(function() {
        $('#quickreplyform, #quickreplyform_overlay').fadeIn();
        $('#quickreplyform').load(''+replyURL+' form[action="/post"]');
        return false;
    });
    $('.i_post').click(function() {
        $('#quickreplyform, #quickreplyform_overlay').fadeIn();
        $('#quickreplyform').load(''+postURL+' form[action="/post"]');
        return false;
    });
    $(document).click(function(e) {
        if ($(e.target).closest('#quickreplyform').length === 0) {
            $('#quickreplyform, #quickreplyform_overlay').fadeOut();
          $('#quickreplyform').html('<img src="https://i62.servimg.com/u/f62/18/32/73/91/loadin10.gif"/>');
        }
    });
    $(document).keyup(function(e) {
    if (e.keyCode == 27) {
        $('#quickreplyform, #quickreplyform_overlay').fadeOut();
      $('#quickreplyform').html('<img src="https://i62.servimg.com/u/f62/18/32/73/91/loadin10.gif"/>');
    }
    });
});
  Bài viết hay nhất2
Error in QuickReply JQuery Code  Oooooo10
https://i.servimg.com/u/f62/19/08/62/30/oooooo10.png

Code:
var overlay = function () {
  // Escrito por Chalo فكرة ومنتاج {وهبة الساحر}قم بتعديله لى يعنى متسويين على ما  اظن..!
  //2018
  var g, e, a = document.createElement('div'),
    b = ' background: rgba(0, 0, 0, 0.5); -webkit-background-size: cover;position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999; pointer-events:none;display:none',
    c = document.body,
    d = document.forms.post.message,
    f = $(d).sceditor('instance');
  c.appendChild(a);
  a.style.cssText = b;
  a.id = 'overlay';
  f.focus(function (e) {
    e = document.getElementById('quick_reply');
    g = document.getElementById('overlay');
    a.style.display = 'block';
    e.style.zIndex = '1000';
    e.style.position = 'relative';
    f.blur(function () {
      g.style.display = 'none';
    });
    document.addEventListener('keyup', function (e) {
      if (e.keyCode === 27) {
        f.blur();
      };
    }, false);
  });
};
$(function () {
  $(function () {
    document.location.pathname.match(/\/t(\d+)/g) && $.sceditor && overlay();
  });
});
You cannot reply to topics in this forum