1
如果在div.deletePhone
內沒有內容,那麼你需要指定高度,否則它將是0px
。jquery add div與類不工作
#div1 ul li .deletePhone{
background-image: url(http://localhost/TheEatTel/public/images/close.png);
background-repeat: no-repeat;
height:100px; /*some height value*/
}
這或將在div.deletePhone
var phone
:
$("#div1 ul").append("<li><div class='deletePhone'>"+phone+"</div></li>");
deletePhone = deleteFood? – 2013-03-18 18:37:32
'.deleteFood'在哪裏? – 2013-03-18 18:37:35
對不起,這只是寫錯誤,問題仍然存在 – 2013-03-18 18:39:33