1

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...

Luca
  • 169
  • 8
  • 1
    Check your browser network tab. Most likely problem is that you haven't really made the file available on your server, for some reason. – Pointy Oct 02 '14 at 00:17
  • 1
    Yeah, thanks, after some more debug I found what was the problem. I wrote lab.min.js while the filename was LAB.min.js. My local server under windows is not case sensitive while the webserver is... – Luca Oct 02 '14 at 16:34

0 Answers0