Reputation: 693
I am trying to use twitter bootstrap 3 in my code,but its not working.Where am I going wrong,please help me out. Here is the code:
<html>
<head runat="server">
<title>Untitled Page</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<link rel="Stylesheet" href="css/bootstrap.min.css" />
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/datepicker.css">
</head>
<body>
<form id="form1" runat="server">
<input type="text">
</form>
<script src="https://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/datepicker.js"></script>
<script>
$(document).ready(function() {
$("#main input").datepicker();
});
</script>
</body>
</html>
Upvotes: 1
Views: 1744
Reputation: 269
Just add a id to the input field
<input id="dp" type="text">
and in jquery
<script src="js/datepicker.js"></script>
<script>
$(document).ready(function() {
$('#dp').datepicker();
});
</script>
Upvotes: 4