LABjs : How to append the scripts to the end of the body tag

120 views Asked by At

I have used queueScript to append the scripts. But they are appended in the <head> tag. I want to append them at the end of the body tag. how do I do it?

var comp;
    var _DIR_ = "js/vendor/";
    var _BOWER_DIR_ = "bower_components/";
    $LAB.setOptions({
        AlwaysPreserveOrder: true
    });
    $LAB
        .queueScript(_DIR_+'jquery2.1.3.min.js')
        .queueScript(_DIR_ + 'angular.min.js')
        .queueWait()
        .queueScript(_BOWER_DIR_ + 'angular-bootstrap/ui-bootstrap-tpls.min.js')
        .queueScript(_DIR_+'angular-animate.min.js')

        .runQueue();
</script>
1

There are 1 answers

1
Mazaz On

Can you use?

 document.head.appendChild('your scripts here')

And grab your head like this or something:

 var head = document.getElementsByTagName("head")[0];