【问题标题】:How do I rerender mathquill.js?如何重新渲染 mathquill.js?
【发布时间】:2015-01-29 17:39:54
【问题描述】:

问题是,我正在使用 angularjs ng-include 来加载部分,如果我放的话,mathquill 框在部分中

<script src="/MathQuill/mathquill.js"></script>

在局部视图中,它工作正常,但我会收到警告:

Synchronous XMLHttpRequest on the main thread is deprecated because of its   detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.

如果我放

<script src="/MathQuill/mathquill.js"></script>

在主视图中,加载部分后,mathquill 根本不起作用,这是渲染问题吗?如何重新渲染局部视图?或者如果不是,我该如何解决?

【问题讨论】:

    标签: javascript angularjs mathquill


    【解决方案1】:

    在 mathquill 网站上找到:

    请注意,对于文档准备好的 HTML DOM 中没有动态创建的元素,您需要在插入可见的 HTML DOM 后调用我们的 jQuery 插件:

    $('<span>x^2</span>').appendTo('body').mathquill() or .mathquill('editable')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-25
      • 2020-02-13
      • 1970-01-01
      • 2021-02-06
      • 2011-09-06
      • 2020-09-29
      • 2021-04-07
      • 2017-11-13
      相关资源
      最近更新 更多