3

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>
Divya Barsode
  • 778
  • 1
  • 5
  • 15

1 Answers1

0

Can you use?

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

And grab your head like this or something:

 var head = document.getElementsByTagName("head")[0];
Mazaz
  • 108
  • 3
  • i dont want it to append it on the header. For performance purpose need to append them at the end of the body tag. Not sure if LABjs loads the script files at the end after loading the html or in the begining itself – Divya Barsode Feb 24 '17 at 09:35