I’m trying to pop a simple datepicker but can’t or I don’t know what reason. here’s my code:
<!DOCTYPE html> <html> <script type='text/javascript' src='jquery/jquery.js'> </script> <link type='text/css' href='css/smoothness/jquery.css' rel='Stylesheet' /> <script type='text/javascript' src='jquery/jquery-ui.js'> </script> <script type='text/javascript'> $('#date').datepicker(); </script> <body> <input type='text' name='date' id='date' /> </body> </html>
I’m running an apache server with all the correct path. Anyone may know why this is not working?
Try:
The point being that your check probably fails because the date element doesn’t exist yet, particularly since it isn’t declared until after the the script that looks for it.