General Information about JavaScript
JavaScript is typically used to dynamically change things and add interactivity, since it runs on the browser. Although it is very robust in parsing the DOM, errors in HTML structure can cause the JavaScript parser to construct the DOM inadequately: thus JavaScript can not find the desired target it is looking for.
For beginners validators are another nice tool, but they are hardly perfect. You could have all sorts of validation errors and your JavaScript will work just fine or it can pass validation and your JavaScript fails.
Many users find a JavaScript/jQuery code snippet and insert it their programming. In many cases they end up corrupting the global namespace and the code snippets misbehave, sometimes with no errors what-so-ever.
When debugging JavaScript problems with vBulletin: duplicate your style with the style manager and revert any templates that might interfere with what you are testing -- start with "headerinclude" template. You can also use browser addons and intrinsic browser tools to disable a particular JavaScript interactively.
Hopefully this will help somebody.