我有一个查询来在jquery日历中显示日历事件。我想在鼠标悬停和点击事件上弹出所有年度事件我想要显示一个单独的浏览器窗口来显示事件的详细信息。所有事件都是动态的。请帮帮我???
这是我的链接
JS
$(document).ready(function () {
var Event = function (text, className) {
this.text = text;
this.className = className;
};
var events = {};
events[new Date("09/14/2013")] = new Event("Valentines Day", "green");
events[new Date("09/18/2013")] = new Event("Payday", "green");
console.dir(events);
$("#dates").datepicker({
beforeShowDay: function (date) {
var event = events[date];
if (event) {
return [true, event.className, event.text];
} else {
return [true, '', ''];
}
}
});
$(document.body).on('mouseenter', '.green', function () {
// alert(1);
var $myval = $(this).attr('title');
//alert($myval);
$(this).append('<div class="dyn"><a href="google.com" target="_blank" ></a><span >cancel</span></div>');
$('.dyn a').html($myval);
//$('.pop').show();
});
//);
$(document.body).on('mouseleave', '.green', function () {
$(this).children('a').next('div').remove();
return true;
});
$('.pop a').live('click', function () {
var $mixtc = $('.pop a').val();
alert($mixtc);
$(this).parent().remove();
});
});