arguiot/DisplayJS

$.empty() is not work very well

nile52 opened this issue · 3 comments

$.empty() can't empty the content which I insert by $.after() & $.before()
html
<div class="testEl">I'll have before and after HTML when DisplayJS will do its work</div>
js
$.after($.select(".testEl"), "<h1>Hello, I'm the after HTML</h1>"); $.empty($.select(".testEl"))

$.empty() should work, could you give me a screenshot of your DOM (like a screenshot of the Chrome Dev console)

Yeah, normal, you try to empty something that is already empty, try select <h1> instead of the element before 😊.