1
嘿,只是想知道是否有人使用或知道如何使用Stefano Verna製作的jQuery iCal插件? jQuery文件正在被調用,正在創建日曆,風格正在工作,但我無法弄清楚如何將它連接到我的數據庫,以便日曆中顯示事件並顯示鼠標懸停彈出窗口?我發現很少的幫助,到目前爲止,僅此代碼: Jquery iCal插件的問題
$(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>