Reputation: 3754
I'm trying to append large amount of HTML(around 10k lines) to bootstrap modal.
async function generatereport(){
$('#ProfilingReport').empty();
let BIGHTML = await GenerateBIGHTML();
$("#ProfilingReport").append(BIGHTML);
}
And html
<div class="modal-body" id="#ProfilingReport">
</div>
However the modal is still empty after the function has finished running. Is there a way to append big amount of html to a modal or a window?
Upvotes: 0
Views: 136
Reputation: 329
#
selector is used when call the data from div or to pass data into div in jQuery
You need to remove the #
symbol from div's id="#ProfilingReport"
<div class="modal-body" id="ProfilingReport">
</div>
Reference: https://api.jquery.com/id-selector/
Upvotes: 3