LABjs loading error

367 views Asked by At

I wrote a page loading almost all JS using labJS

<script type="text/javascript" src="js/lab.min.js"></script>
<script>
    $LAB
    .script({ src:"http://vk.com/js/api/share.js?90", type:"text/javascript", charset:"windows-1251" })
    .script("js/mootools.js").wait()
    .script("js/jquery-2.1.1.min.js").wait()
    .script("js/scroll.js")
    .wait(function(){
        addEvent();
        bind();
    })
    ;
</script>

If I browse it locally, with Usbwebserver, all works fine but when I load it on the webserver it doesn't work. The debug console tells me "ReferenceError: $LAB is not defined" and all following calls to JS functions fail consequently. I wonder whether the second script is executed before labJS was fully loaded but I don't understand why and how to solve it...

0

There are 0 answers