If I have just the #index on my body element, the length method gives me the correct answer of 1. But if I have a second ID on this body element the length method gives me 0. Whats wrong with that?
$("#index").length
You can test it here. Just remove the .removeme from the body tag and try the command in the developer console again.
http://fiddle.jshell.net/RmqsS/2/show/
Any ideas or suggestions?