Search code examples
javascriptlocal-storagelawnchair

Uncaught ReferenceError: Lawnchair is not defined


I'm trying to get the basic lawnchair example working.

The Code:

<script type="text/javscript" src="http://westcoastlogic.com/lawnchair/src/lawnchair.js"></script>

<script type="text/javascript">
    var people = new Lawnchair('people');
</script>

Gives the following error (in FF & Chrome consoles):

Uncaught ReferenceError: Lawnchair is not defined

What am I doing wrong?


Solution

  • You misspelled "javascript" in the first <script> tag's "type" attribute. The browser therefore paid no attention to the file.

    Many people, most of them attractive and popular, now recommend leaving off the "type" attribute entirely unless you explicitly want the browser to ignore the contents.