I updated my code here:
<div class="selector">
<h2 class="heading">Choose A Date</h2>
</div>
<img class="page-img" src="images/" width ="400px" height="600px" alt="front page here" title="image here">
<script type="text/javascript">
// Datepicker
$(document).ready(function (){$('.selector').datepicker({
inline: true,
dateFormat: 'yy-mm-dd',
constrainInput: true,
changeYear: true,
changeMonth: true,
maxDate: '0',
yearRange: '-100y',
onSelect: function(dateText, inst) {
//$("input[name='yy-mm-dd']").val(dateText);
$(".page-img").attr("images/", dateText + ".jpg");
}
});
});
I need to have the datepicker work so that when a date is selected, an image will be called and each date has it’s own unique image. Someone advised me to use the jQuery attr() method and use it for src of image.
Take a look at this, I made an example for you:
http://jsfiddle.net/oscarj24/4xYfp/
Hope this helps