#
September 12, 2012 at 12:54 am
Also, it’s generally best practice to make sure you IDs and classes are lowercase. There is *some* preference to using camelCase out there, but I think the industry standard is lowercase with hyphens.
So it your example:
`#ContentRow` would become `#content-row` and `.Blue` would be `.blue`, etc.
You don’t need to add periods when using `.hasClass()`. It also doesn’t play very nicely with multiple class names, they have to be in the proper order. So if you do `.hasClass(‘first second’)` but the element on the page is actually `class=”second first”` then hasClass() will return `false`.
Here’s an example for you: http://jsfiddle.net/e6kE3/