I don't know why but when I display the source code for my Wordpress page, there is <script src="ROOT/jquery">
before each script.
Loading it once in between the <head>
tags is enough. This leads to another script not working as expected. I read about a function called wp_enqueue
, but I don't understand how it works.
here is the script it doesn't work:
<script>
$(document).ready(function(){
//Datepicker Popups calender to Choose date
$(function(){
$( "#datepicker" ).datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
yearRange: '1900:2050',
dateFormat: "dd/mm/yy"
//Pass the user selected date format
});
});
});
</script>
Can someone help me?
Thanks,
Daniele