Sounds like you may of skipped steps from the demo page. But it might be that your code has typos and/or syntax errors, unclosed HTML or javascript comment or other tags.
To really tell what the problem is (actually sounds like it may be more than one problem), we would need to see the entire code:
Please post a link to a page on your site that contains the problematic code so we can check it out.
If you don't want to put a page with errors on your site, that's OK. Upload it as an orphan and give us a link to it.
Bookmarks