我正在尝试使用字形图标来更改 fullcalendar 的下一个、上一个按钮的样式。
这是我的代码:
$(document).ready(function() {
$('#calendar').fullCalendar({
buttonText : {
prev : '<i class="glyphicon glyphicon-triangle-left"></i>',
next : '<i class="glyphicon glyphicon-triangle-right"></i>'
}
});
});
它不起作用。显示如下:
这是渲染的 html 代码,
我不知道哪里出了问题。 非常感谢您的帮助。
最佳答案
也许 prev 和 next 只是预期的文本。即使有 html 标签,它们也被视为文本。 创建日历后,您是否尝试在 javascript 中添加这些图标?
喜欢:
...
$('#calendar').fullCalendar({
buttonText : {
prev : '<i class="glyphicon glyphicon-triangle-left"></i>',
next : '<i class="glyphicon glyphicon-triangle-right"></i>'
}
});
$(".fc-prev-button").append('<i class="glyphicon"...</i>')
...
关于javascript - 无法在全日历的下一个和上一个按钮中使用字形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31181126/