嘿,只是想知道是否有人使用或知道如何使用Stefano Verna制作的jQuery iCal插件?正在调用jQuery文件并正在创建日历,样式正在运行,但我无法弄清楚如何将它连接到我的数据库,以便日历中显示事件并在鼠标悬停时显示coda弹出窗口?到目前为止我找不到任何帮助,只有这段代码:
$(document).ready(function()
{
$("#ical").ical({
eventdates: [
<?php
include ("Includes/dbConnect.php");
$query2 = "SELECT * FROM events";
$checkevent = mysqli_query($cxn,$query2) or die("Couldn't execute query!");
$count = 0;
while ($row2 = mysqli_fetch_array($checkevent)):
if ($count == 0) echo '{'; else echo ',{';
$count++;
$eventDate = $row2['eventDate'];
$eventName = $row2['eventName'];
$eventHost = $row2['host'];
echo '"date": "' . $eventDate . '",';
echo '"title": "' . $eventName . '",';
echo '"desc": "' . $eventHost . '"';
echo '}';
endwhile;
?>
]
});
});
</script>