Javascript JQUERY在Fullcalendar上显示html div
是否可以在jquery fullcalendar上显示html标记。 例:Javascript JQUERY在Fullcalendar上显示html div,javascript,jquery,html,fullcalendar,Javascript,Jquery,Html,Fullcalendar,是否可以在jquery fullcalendar上显示html标记。 例: $('#a')。悬停(函数(){ $(this.css('backgroundColor','red'); }, 函数(){ $(this.css('backgroundColor','white'); } ); Fullcalendar插件 我用下面的代码找到了答案,希望它能帮助别人 javascript eventMouseover: function(calEvent, jsEvent) {
$('#a')。悬停(函数(){
$(this.css('backgroundColor','red');
},
函数(){
$(this.css('backgroundColor','white');
}
);
Fullcalendar插件
我用下面的代码找到了答案,希望它能帮助别人 javascript
eventMouseover: function(calEvent, jsEvent) {
var tooltip = '<div class="tooltipevent" style="width:auto;height:auto;background:#FFB347;position:absolute;z-index:10001;font-size: 3em;">' + calEvent.title +'</div>';
$('#myResults').html(calEvent.title);
$("body").append(tooltip);
$(this).mouseover(function(e) {
$(this).css('z-index', 10000);
$('.tooltipevent').fadeIn('500');
$('.tooltipevent').fadeTo('10', 1.9);
}).mousemove(function(e) {
$('.tooltipevent').css('top', e.pageY + 10);
$('.tooltipevent').css('left', e.pageX + 20);
});
}
eventMouseover:函数(calEvent,jsEvent){
变量工具提示=“”+calEvent.title+“”;
$('#myResults').html(calEvent.title);
$(“正文”).append(工具提示);
$(此).mouseover(函数(e){
$(this.css('z-index',10000);
$('.tooltipevent').fadeIn('500');
$('tooltipevent').fadeTo('10',1.9);
}).mousemove(函数(e){
$('.tooltipevent').css('top',e.pageY+10);
$('.tooltipevent').css('left',e.pageX+20);
});
}
HTML
我不明白你的意思。。。这个代码有效。什么是fullcalendar?这段代码与fullcalendar有什么关系?很抱歉,我刚刚编辑了我的问题:)你所说的在上面显示html div是什么意思?
eventMouseover: function(calEvent, jsEvent) {
var tooltip = '<div class="tooltipevent" style="width:auto;height:auto;background:#FFB347;position:absolute;z-index:10001;font-size: 3em;">' + calEvent.title +'</div>';
$('#myResults').html(calEvent.title);
$("body").append(tooltip);
$(this).mouseover(function(e) {
$(this).css('z-index', 10000);
$('.tooltipevent').fadeIn('500');
$('.tooltipevent').fadeTo('10', 1.9);
}).mousemove(function(e) {
$('.tooltipevent').css('top', e.pageY + 10);
$('.tooltipevent').css('left', e.pageX + 20);
});
}
<div id="myResults"></div>