yaniswang / xhEditor

xhEditor是一个基于jQuery开发的简单迷你并且高效的在线可视化HTML编辑器。
http://xheditor.com/
GNU Lesser General Public License v3.0
244 stars 79 forks source link

xhEditor与bootstrap有冲突 #24

Open spzgy opened 8 years ago

spzgy commented 8 years ago

bootstrap中有一个“按钮 button.js” http://v3.bootcss.com/javascript/#buttons-stateful

在页面加如这种按钮的特效后,会提示错误

<script>
  $('#myButton').on('click', function () {
    var $btn = $(this).button('loading')
    // business logic...
    $btn.button('reset')
  })
</script>

JS错误: Uncaught Error: cannot call methods on button prior to initialization; attempted to call method 'loading'

去掉“按钮 button.js”的调用,或者是去掉xhEditor,就正常了。