arguiot/DisplayJS

$.load() how to load a html page?

JZLeung opened this issue · 1 comments

test.html:

<p class="status">Loading</p>
<div class="load"></div>

js:

const $ = new DisplayJS(window)
$.load('.load', './_load.html', function(){
  $.html('.status', 'Loaded')
})

_load.html:

<div class="load">
    <h3>Load Success!!!!</h3>
    <p>Here is from load.html!!!!!</p>
</div>

but test.html will not load the _load.html

I fixed the function in the latest version 😊