admin管理员组文章数量:1389534
I'm trying to change a style of next, previous buttons of fullcalendar by using a glyphicon.
Here is my code:
$(document).ready(function() {
$('#calendar').fullCalendar({
buttonText : {
prev : '<i class="glyphicon glyphicon-triangle-left"></i>',
next : '<i class="glyphicon glyphicon-triangle-right"></i>'
}
});
});
It's not working. It's shown like this:
And here is a rendered html code,
I didn't know what was wrong. Thanks a lot for your help.
I'm trying to change a style of next, previous buttons of fullcalendar by using a glyphicon.
Here is my code:
$(document).ready(function() {
$('#calendar').fullCalendar({
buttonText : {
prev : '<i class="glyphicon glyphicon-triangle-left"></i>',
next : '<i class="glyphicon glyphicon-triangle-right"></i>'
}
});
});
It's not working. It's shown like this:
And here is a rendered html code,
I didn't know what was wrong. Thanks a lot for your help.
Share Improve this question edited Jul 2, 2015 at 9:47 uraimo 19.9k8 gold badges50 silver badges57 bronze badges asked Jul 2, 2015 at 9:43 Hikaru ShindoHikaru Shindo 2,9239 gold badges40 silver badges70 bronze badges2 Answers
Reset to default 5Maybe prev and next are only expected text. And even if there are html tags, they are considered as text. Did you tried to add these icon in javascript after the creation of the calendar?
Like:
...
$('#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>')
...
That seems to set the text content of the button, while you want to use a custom css class to display a custom icon.
Have you tried using buttonsIcons
instead?
$('#calendar').fullCalendar({
buttonsIcons : {
prev: 'left-single-arrow',
next: 'right-single-arrow',
}
});
I'm not pletely sure that you can use custom named css classes, some posts seem to hint to the fact that it could not be that easy.
本文标签: javascriptUnable to use glyphicon in nextampprev buttons of fullcalendarStack Overflow
版权声明:本文标题:javascript - Unable to use glyphicon in next&prev buttons of fullcalendar - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744641356a2617141.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论