Uncaught ReferenceError: Lawnchair is not defined [closed]
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: Lawnch开发者_StackOverflowair is not defined
What am I doing wrong?
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.
Looks like you got a typo in the first script tag. 'text/javscript' = 'text/javascript
Actually that example is no longer valid as of the current build. Take a look at this check in. Require a callback in the Lawnchair constructor.
I'm still trying to get it straight myself but the constructor requires a callback in addition to the object passed in. I'll post what I got when its working.
精彩评论