I try to implement jQuery calender at my homepage: This is the way I do it:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Default functionality</title>
<script src="jquery-1.7.1.js"></script>
<script src="jquery.ui.core"></script>
<script src="jquery.ui.widget.js"></script>
<script src="jquery.ui.datepicker.js"></script>
<script src="core.js"></script>
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
</head>
<body>
<div class="demo">
<p>Date: <input type="text" id="datepicker"></p>
</div>
</body>
</html>
In the same folder I have all the javascripts that are required. But when I try to click inside the form, no calendar is showing. Why? Thanks!
each script should have :
<script src="xxx" type="text/javascript">
also add this line and tell what it says :
<script type="text/javascript">
$(function() {
alert('1');
});
</script>
You should also specify type
for your script tags. Have a look at this jsfiddle .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.