<input type="text" name="date" id="date" class="datepicker" value="Date" />
Which calls up my javascript
$('#date').datepicker({
...
Now in order to change the calandar for mobiles, I have started off by changing the above to
if (screen.width <= 768) {
}else{
// load datepickers
$('#date').datepicker({
...
});
}
The problem is, the code I need to use in the if statement to load the dropdown calandar is php
<select name="date_day">
<?php
$i=1;
while($i < 32){
echo "<option>".$i."</option>";
$i++;
}
?>
...
So how would I go about adding this to the javascript? Is it ok to just place it in there?
Cheers
This post has been edited by nick2price: 27 July 2012 - 02:31 AM

New Topic/Question
Reply



MultiQuote





|