0

Copied the code below right from http://jqueryui.com/datepicker/ into Notepad and save as *.htm, then Boom, it doesn't work... Anyone know why?

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker"></p>
</body>
</html>
Casperonian
  • 176
  • 5
  • 19
  • 1
    I guess, you are using a http connection. But this example is for https connection. Checkout this questions http://stackoverflow.com/questions/547384/where-do-you-include-the-jquery-library-from-google-jsapi-cdn – Md. Al-Amin Sep 10 '14 at 02:42
  • just add http: in your script source, for further detail you can check the @Md.Al-Amin link. – adhi Sep 10 '14 at 02:51
  • Yes, this works for the example, but when I apply it into my code, it doesn't work. – Casperonian Sep 11 '14 at 08:27

1 Answers1

0

Found out the problem. jquery version issue. Updated to the new version and it works.

Casperonian
  • 176
  • 5
  • 19