1
我正在加載內容,我想向該內容添加一個類。如何使用jQuery將類添加到加載的內容
主要內容
<div id="notice">
</div>
內容被加載。
<p>Se vår <br />
siste <span>KAMPANJE</span></p>
<p>Våre <span>TILBUD</span></p>
我的jQuery到目前爲止。
$('#notice').load('notice.asp'); // this loads ok.
// but this does not
$("#notice p:even").addClass("bluenotice noticecommon");
$("#notice p:odd").addClass("greennotice noticecommon");
我可以將AddClass()添加到加載的內容嗎?
在此先感謝。
你打敗了我;)+1 – jwueller 2010-12-07 16:19:23