Class selector does not work
On my page I have a problem: selecting elements on class does not work using jQuery. The strange thing is that it does work using document.getElementsByClassName.
- jQuery('.ContentMethodIntroduction').css('width', '50px'); //does nothing
document.getElementsByClassName('ContentMethodIntroduction')[0].style.width='50px'; //works
How can this be? I thought jQuery uses the same document.getElementsByClassName (when supported)? What can be the cause of this problem?
My page does pass the W3C XHTML 1.0 Transitional validator test.