The user can click a button to view another day's information. On one click is tomorrow, next click is in 2 days, 3 clicks = 3 days... etc.
Here is my code, as of right now it will work one time (show only one days information) but then it will not go any further on additional clicks. Any idea? Thank you!
CODE EDIT:
$(document).on("click", "#day-right", function(event){
<?php timeSelect(); ?>
document.getElementById("date").innerHTML = "<?php echo $dateSelect ?>";
});
PHP REF
function timeSelect() {
static $extraDays = 1;
global $dateSelect;
$dateSelect = date("mdY", strtotime("+" . "$extraDays" . " day"));
$extraTime++;
}