bootstrap列表中两个常用方法,以及div中的垂直居中的操作步骤!

1.onLoadSuccess()
此方法在Bootstarp Table数据成功加载返回后触发,参数为data(注意:data传入的数据是分页后的数据,并不是所有查询出来的数据,如果limit为10,那么就是10条数据),此时表格行数据尚未渲染,此时可以对数据进行更新或取值操作。
2.onPostBody()
此方法在Bootstarp Table 行数据渲染后触发,参数为data,此时要注意,如果执行了上面的updateRow操作,由于表格刷新了,所以又会触发onPostBody(),然后会陷入死循环,导致页面数据一直加载不出来。

 

div居中问题:

var $gongneng=$(".content .item:nth-child(2) .merge ");
var parentHeight3=parseInt($gongneng.parent().css("height"));
$gongneng.css("margin-top",(parentHeight3-50)*0.35+"px");

通过js获取当前模块属性

然后获取要居中模块的空白处高度

获取50%的高度。

$(this).css("display","inline");
$(this).siblings("span").remove();

$(this).css("display","inline");
$(this).siblings("span").remove();

$(this).css("display","inline");
$(this).siblings("spa是 n").remove();

$(this).css("display","inline");
$(this).siblings("span").remove();

 

 

$(this).css("display","inline");
$(this).siblings("span").remove();

$(this).css("display","inline");
$(this).siblings("span").remove();

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值