jquery datepicker-mouseover不';换了一个月后我就不工作了

jquery datepicker-mouseover不';换了一个月后我就不工作了,jquery,datepicker,mouseover,Jquery,Datepicker,Mouseover,我发现它上面的一些jquery事件日历的例子工作得很好,直到我更改了month-mouseover停止工作。只有一次改变是有效的 示例中至少有一个bug: $(.a”).mouseover它应该是$(.ui状态默认值”).mouseover 我发现类似的问题,但这对我没有帮助 你能帮我吗 非常感谢问题在于功能缺失: onChangeMonthYear: function () { setTimeout(function() { updateRefs(); }, 0

我发现它上面的一些jquery事件日历的例子工作得很好,直到我更改了month-mouseover停止工作。只有一次改变是有效的

示例中至少有一个bug:
$(.a”).mouseover
它应该是
$(.ui状态默认值”).mouseover

我发现类似的问题,但这对我没有帮助

你能帮我吗


非常感谢

问题在于功能缺失:

onChangeMonthYear: function () {
    setTimeout(function() {
        updateRefs();
    }, 0);  
}
全部代码:

<div id="dialog"></div>
<div id="datepicker"></div>

<script type="text/javascript">
    $(document).ready(function() {
        var activeDays = [1,4,10,21,22,23,27,28,30];
        $('#datepicker').datepicker({
            dateFormat: 'yy-m-d',
            inline: true,

            //show only selected days
            beforeShowDay: function(date) {
                var hilight = [false,''];
                if ( activeDays.indexOf( date.getDate() ) > -1) {
                    hilight = [true,'isActive'];
                }
                return hilight;
            }, 
            //update references after month change
            onChangeMonthYear: function () {
                setTimeout(function() {
                    updateRefs();
                }, 0);  
            },

            /* onSelect freezes the dialog box and populates with a link
            want to populate the dialog on hover and then freeze so that link can be followed*/    
            onSelect: function(date) {
                $('#dialog').dialog({ autoOpen: false });
                var detail = $(".ui-state-default.ui-state.hover").html();
                $('#dialog').attr('title', "changed");
                $('#dialog').html( '<a href="http://www.xxx/addoreditevent.php?id=1">' + "<span style='color: #7f7fff; font-weight: lighter;'>" + '(edit)  ' + ' date: ' + date + ' </span></a>');
                //now open the dialog
                $('#dialog').dialog('open');
                }
        });

        //create dialogue
        //title could be set once, and before createing dialogue
        $('#dialog').attr('title', 'events');
        var dlg = $('#dialog').dialog({
            autoOpen: false,
            draggable: false,
            resizable: false,
            width: 650
        });


        function updateRefs() {
            $(".ui-state-default").mouseover(function() {
              dlg.dialog("open");
            //open dialogue  
            }).mousemove(function(event) {
              dlg.dialog("option", "position", {
                my: "left top",
                at: "right bottom",
                of: event,
                offset: "20 20"
              });
              //write dialogue text, html could be set dynamicaly, title not !
              var dateF = $(this).text()+"."+$(".ui-datepicker-month",$(this).parents()).text()+"."+$(".ui-datepicker-year",$(this).parents()).text();  
              $('#dialog').html( '<a href="http://www.xxx/addoreditevent.php?id=2">' + "<span style='color: #7f7fff; font-weight: lighter;'>" + '(edit)  ' + 'text: ' + $(this).text() + 'date: ' + dateF + ' </span></a>');
            //close dialogue  
            }).mouseout(function() {
                dlg.dialog("close");
            });
        }

        updateRefs();
        }); 

</script>

$(文档).ready(函数(){
var-activeDays=[1,4,10,21,22,23,27,28,30];
$(“#日期选择器”)。日期选择器({
日期格式:“yy-m-d”,
是的,
//仅显示选定的日期
beforeShowDay:功能(日期){
var hilight=[false',];
if(activeDays.indexOf(date.getDate())>-1){
hilight=[true,'isActive'];
}
回光返照;
}, 
//更改月份后更新引用
onChangeMonthYear:函数(){
setTimeout(函数(){
updateRefs();
}, 0);  
},
/*onSelect将冻结对话框并填充链接
要在悬停时填充对话框,然后冻结,以便可以跟随链接*/
onSelect:功能(日期){
$('#dialog').dialog({autoOpen:false});
var detail=$(“.ui state default.ui state.hover”).html();
$('dialog').attr('title','changed');
$('#dialog').html('');
//现在打开对话框
$('dialog')。dialog('open');
}
});
//创造对话
//可以在创建对话之前设置一次标题
$('#dialog').attr('title','events');
var dlg=$('#dialog')。dialog({
自动打开:错误,
可拖动:错误,
可调整大小:false,
宽度:650
});
函数updateRefs(){
$(“.ui状态默认值”).mouseover(函数(){
对话框(“打开”);
//公开对话
}).mousemove(函数(事件){
对话框(“选项”、“位置”{
我的:“左上”,
在“右下角”,
活动名称:,
抵销:“20”
});
//写对话文本,html可以动态设置,标题不能!
var dateF=$(this.text()+“+$(.ui datepicker month)”,$(this.parents()).text()+“+$(.ui datepicker year)”,$(this.parents()).text();
$('#dialog').html('');
//密切对话
}).mouseout(函数(){
dlg.对话框(“关闭”);
});
}
updateRefs();
});