Jquery mobile - 在内容发生变化后格式丢失

时间:2011-06-24 17:32:42

标签: jquery formatting refresh jquery-mobile

我正在尝试使用jQuery mobile显示日历。一切顺利,直到点击下个月或上个月:页面失去了格式化。

我已经尝试删除并重建日历的包装器......但它没有改变任何内容。

这是我的onClick功能:

function displayPreviousMonth(month, year){

    $('#calendar_graphic').remove();
    $('#calendar div[data-role="content"] #calendar_wrapper').html('<div id="calendar_graphic"></div>');
    var cal = new Calendar(month, year);
    cal.generateHTML(month, year);
    $('#calendar_graphic').html(cal.getHTML()).page();
}

代码基于这篇文章: http://jquerymobiledictionary.dyndns.org/faq.html

0 个答案:

没有答案