Есть ли такой скрипт который везде заменяет катигорию всего на одну картинку особенно вот тут
Пробовала эти скрипты,
<script type="text/javascript"><!--Своя картинка в каждую категорию -->
$(document).ready(function(){
myarray=new Array(
"Информационный раздел", "http://mybb.ru/f/collection/0208.gif",
"Техническая поддержка", "http://mybb.ru/f/collection/0211.gif",
"Форумы опытных пользователей", "http://mybb.ru/f/collection/0213.gif",
"Разное", "http://i039.radikal.ru/0806/ec/a5ffc6d7cfd9.gif",
"Статистика форума", "http://mybb.ru/f/collection/0217.gif" //Последний элемент без запятой!
)
$("#pun-index div.category h2,#pun-index #pun-stats h2").each(function (i) {
for(q=0;q<myarray.length;q++){
var cssObj = {
"height":"50px",
"background-color": "transparent",
"background-image":"url("+myarray[q+1]+")",
"background-position":"50% 50%",
"background-repeat":"no-repeat" //Последний элемент без запятой!
}
if($(this).children("span").text()==myarray[q])$(this).css(cssObj);
q++}
});
});
</script><style>
.category h2 span {
display: none;
}
#pun-category1.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category2.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category3.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category4.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category5.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category6.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category7.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category8.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category9.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category10.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category11.category h2 {
background: url(ссылка) no-repeat center bottom;
}
#pun-category12.category h2 {
background: url(ссылка) no-repeat center bottom;
}
</style>но они только на главной всё заменяют и в каждую категорию это надо всё вставлять, а мне надо всего на одну картинку чтоб она везде показывалась и на главной и втемах и опрсах., во всех местах.
Есть ли такой скрипт не используя при этом Css
Теги: категории
Отредактировано Anima (2012-01-17 09:13:21)

