我试图使用设置为一个div背景的jQuery:jQuery的目标DIV风格
$(".cover").css("background", "yellow");
不过,我不断收到:
Uncaught TypeError: Cannot call method 'css' of null
而且与添加的ID,而不是试图类:
$("cover").css("background", "yellow");
但随后说:
Uncaught TypeError: Object # has no method 'css'
的源代码:http://pastebin.com/FEVwL8iq
你做,该文件被加载后? – xception
HTML请??? –
JSfiddle会很好。或者只是一些HTML去与这个JS。 – Whymarrh