After struggling for 2 days i am still not able to integrate node+express+boilerplate and a simple JQuery module (Date Picker).
As a final check, i cloned the fresh copy of this project and added the below 4 lines. It failed to show the date prompt which confirmed that the problem isn't at my end. The same 4 lines of code on normal html project works.
I decided to give up on this but there should be a reason why it is not working. I am still not able to figure it out.
Project to clone: https://github.com/mape/node-express-boilerplate
Add these 4 lines to layout.ejs under view directory to head element.
<link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/smoothness/jquery-ui.css" media="all">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<p>Date: <input type="text" id="datepick"></p>
<script type="text/javascript">
$(function() {
$("#datepick").datepicker();
});
</script>
You added the paragraph html element to the element as well? If so, try moving that inside the <body>
tag somewhere, like the views/index.ejs file.