gpt4 book ai didi

jquery - Bootstrap Accordion 压缩内容

转载 作者:行者123 更新时间:2023-12-01 08:38:19 27 4
gpt4 key购买 nike

我在 bootstrap 3 Accordion 中放置了一个全日历,由于某种原因,日历没有以全高度显示,并且被挤压。这是为什么?我该如何解决它?

Here is a demo

HTML

<div class="container">
<div class="row">
<div class="col-xs-10">
<input type="button" class="btn btn-primary" data-toggle="collapse" data-target="#toggleDemo" value="Calendar">

<!-- Collapsible Element HTML -->
<div id="toggleDemo" class="collapse collapse">
<div id="calendar"></div>
</div>
</div>
</div>
</div>

jquery

$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
//Load Full Calendar
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
editable: true,
events: [
{
title: 'All Day Event',
start: new Date(y, m, 1)
}
]
});

//Accordion
$(".btn").on( "click", function() {
$("#toggleDemo").collapse('toggle');
});
});

enter image description here

最佳答案

解决方案如下:

https://codepen.io/creativedev/pen/jKmyvJ

$(document).ready(function() {

var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
//Load Full Calendar
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},

editable: true,
events: [{
title: 'All Day Event',
start: new Date(y, m, 1)
}


]
});
//Accordion
$(".btn").on("click", function() {
$("#toggleDemo").collapse('toggle');
$(window).resize();
});

});

之前:

enter image description here

之后:

enter image description here

关于jquery - Bootstrap Accordion 压缩内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50813651/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com