Code (Шаблон информера)
<li>
<h4><a title="$TITLE$<?if($CATEGORY_NAME$)?> [Категория «$CATEGORY_NAME$»]<?endif?>" href="$ENTRY_URL$"><?substr($TITLE$,0,25)?>...</a></h4>
<?if($IMG_SMALL_URL1$)?>
<img class="prev" style="width:120px;" src="$IMG_SMALL_URL1$" alt="$TITLE$" /><?else?><?if($IMG_URL1$)?><img class="prev" style="width:120px;" src="$IMG_URL1$" alt="$TITLE$" /><?endif?><?endif?>
$MESSAGE$
<?if($CATEGORY_NAME$)?><span class="inf">[<a href="$CATEGORY_URL$"><?substr($CATEGORY_NAME$,0,25)?>...</a>]</span><?endif?>
</li>
Code (CSS информера)
<style type="text/css">
#newsContTable{width:80%;border:0 none;margin:50px auto;}
#newsContTable td{vertical-align:top;text-align:center;width:50%;}
/* StartStyle */
ul.newsCont,ul.newsCont li,ul.newsCont *{
font: 11px/1 Verdana,sans-serif;
list-style:none;
background-image:none;
margin:0;
padding:0;
}
ul.newsCont{
width:200px;
border:1px solid #CCC;
position:relative;
overflow:hidden;
height:200px;
text-align:left;
}
ul.newsCont li{
padding:3px 2px;
opacity:0;
display:none;
position:absolute;
}
ul.newsCont p,ul.newsCont h4{
margin-bottom:3px;
}
ul.newsCont h4 a{
font: bold 11px/1 Georgia,serif;
}
ul.newsCont h4:first-letter {
vertical-align:baseline;color:#C03;
}
ul.newsCont .inf{
position:absolute;
top:187px;right:1px;
text-align:right;
float:right;
background:#FFF;
font-size:10px;
color:777;
padding:1px 3px 2px;
}
ul.newsCont img.prev{
max-height:120px!important;
max-width:120px!important;
border:solid 1px #ddd;
float:left;
margin-right:5px;
padding:3px;
}
/* EndStyle */
</style>
Code
(function($){
$.cycleThru={defaults:{delay:3000,}};
$.fn.extend({cycleThru:function(config){
var config=$.extend({},$.cycleThru.defaults,config);
return this.each(function(){
var delay=config.delay;
var ulid=$(this).attr("id");
var el=0;
var elmax=$(this).children("li").hide().length-1;
function cyclee(){
$("ul#"+ulid+" li:eq("+el+")").show()
.animate({"opacity":"1"}, 400)
.animate({"opacity":"1"}, delay)
.animate({"opacity":"0"}, 400,function(){
(el==elmax)?el=0:el++;
cyclee();
});
};
cyclee();
})
}
})
})(jQuery);