1
I’m trying to add a div via append because I’m adding in a table that has auto-created composites like filter, responsive, pagination, so I would like to place inside one of those div that is next to the filter but when placing the id of the div of these components via jquery it cannot identify and does not add
for example:
<script type="text/javascript">
addSwitches = '<div class="switch"><label>Off<input type="checkbox"
<span class="lever"></span>On</label></div>'
$("#data-table-simple_wrapper").append(addSwitches);
</script>
or
$("#data-table-simple_wrapper").append("<p>teste</p>");
the div "data-table-simple_wrapper" has no html but when I inspect the table I can take the id of the div and add manualmete by editing the html to test but jquery does not find this ID
Not in HTML because this div is generated by some plugin? It would be interesting to post the HTML snippet of the inspect if that’s the case. E Is your javascript code in the same HTML file? At what position exactly, start or end?
– Vinicius Gabriel