Jquery 如何将'slimscroll'集成到'Bootstrap'模式?
我使用的是Bootsrap模式,我试图在其中集成Jquery 如何将'slimscroll'集成到'Bootstrap'模式?,jquery,twitter-bootstrap,slimscroll,Jquery,Twitter Bootstrap,Slimscroll,我使用的是Bootsrap模式,我试图在其中集成slimscroll插件。但它不起作用 这是我的密码: $("#refinequery").on('show.bs.modal', function (e) { var form = $(this).find('form'); that.locationDetails(form, that.formInfo.disciplineProperties);
slimscroll
插件。但它不起作用
这是我的密码:
$("#refinequery").on('show.bs.modal', function (e) {
var form = $(this).find('form');
that.locationDetails(form, that.formInfo.disciplineProperties);
that.queryDetails(form, that.bodyDetails );
$('.modal-dialog').css({
height : $( window ).height()*1,
"overflow-y":'auto'
});
}).on('shown.bs.modal', function () {
$(this).slimscroll({}); //not working properly all are collapsed!
}).modal();
您需要销毁任何现有的关系,您的模式必须在初始化之前进行滚动。下面的代码笔示例适用
$("#myModal").on('show.bs.modal', function() {
$('#myModal .modal-body')
.slimscroll({ destroy: true })
.slimscroll({ height: '500px' })
.text(text);
});
我试着玩了一下slimscroll,看。它只在您第一次按Open时起作用。slimscroll似乎只能应用于一个元素一次,如果您希望在调整大小时更改高度,这将成为一个问题。