For some reason… I can't get this simple get method to work. I'm using data attribute to find out where the meta html is located on the server.
var i = 0;
while (i < 1) {
$('body').find('.div[data-meta]').each(function() {
var $this = $(this)
var meta = $this.getAttribute("data-meta")
$.get(meta, function(data) {$('head').append(data);});
i++;
});
}
<div class="div" data-meta="meta.html"></div>