運行代碼時,第一個文本內容更改不會顯示。它跳到下一個。一次更改一個div文本內容
$("object").addClass("whip");
if($('object').has('whip'))
{
$("object").text('whipping'); /* this doesn't seem to get displayed */
}
$("object").addClass("dab");
if($('object').has('dab'))
{
$("object").text('dabbing'); /* this is the only text displayed and I don't want that */
}
不起作用 – user3323799
請看看實際的代碼,看看這是行不通的。 http://jsfiddle.net/AXcZx/30/ – user3323799
小提琴與您在問題中發佈的代碼無相似之處。 http://stackoverflow.com/help/mcve – Utkanos