Wednesday, 11 September 2013

jquery background image url failed

jquery background image url failed

This is not working ....
$("#news_all ul li").css("background", "transparent
url('../images/01.png') no-repeat");
but this is working
.news_all_item li {
background: url("../images/01.png") no-repeat scroll 0 0 transparent;
margin-bottom: 2%;
}
My html
<div class="news_all_item" id="news_all">
<ul>
<li><div class="news_item">Lorem Ipsum is simply dummy text of the
printing and typesettiLorem Ipsum is simply dummy
textlt;/divgt;lt;/ligt;
lt;ligt;lt;div class=news_itemgt;Lorem Ipsum is simply dummy text of
the printing and typesettiLorem Ipsum lt;/divgt;lt;/ligt;
lt;ligt;lt;div class=news_itemgt;Lorem Ipsum is simply dummy text of
the printing and typesettilt;/divgt;lt;/ligt;
lt;/ulgt;
lt;/divgt;
/code/pre

No comments:

Post a Comment