我試圖使用設置爲一個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