日期:2014-05-16 浏览次数:20534 次
$.each($(".{$this->prefix}allElder"),function(index,value){
var elder = $(this).next().next('.{$this->prefix}elder');
var maxWidth = $this->maxWidth;
var width = $this->width;
var vertical = $(this).children(".{$this->prefix}vertical");
//算出平均长度
length = Math.ceil((maxWidth)/(vertical.length-1)-1);
avage = Math.ceil($this->width/2);//竖线
$.each(vertical,function(index,value){
if( $(this).parent().next().next().children("div:eq("+index+")").html() == null)
{
side = $(this).parent().prev().prev().children("div:eq("+index+")");
} else {
side = $(this).parent().next().next().children("div:eq("+index+")");
}
if(index ==0 )
{
//竖线第一个
$(this).addClass('{$this->prefix}left');
$(this).css({'left':avage+'px','overflow':'hidden','position':'absolute'});
$(side).css({'left':index*length,