Maybe jQuery wasn't loaded yet?