I’m a beginner in JQuery (I know nothing about this framework).
I recently found a code to display a calendar or hours using JQuery and very cool.
How can I use this code?
Follow the link to the code I’m trying to implement in my system (with Razor WebMatrix)
It’s just a matter of including the necessary script and style references, then wiring the components. In this particular case:
Include the jQuery engine core script within the
<head>of your page. Use the most recent version available (currently, 1.5). The script in your sample page uses jQuery 1.4.4:<script type="text/javascript" src="jquery-1.4.4.min.js"></script>Include the jQuery UI core script as well (same here about the version):
<script type="text/javascript" src="jquery-ui-1.8.6.custom.min.js"></script>Include the plugin script(s):
<script type="text/javascript" src="jquery-ui-timepicker-addon.js"></script>Don’t forget to reference the plugin UI elements styles:
<link rel="stylesheet" media="all" type="text/css" href="css/ui-lightness/jquery-ui-1.8.6.custom.css">Wire the plugin with the text box element which will act as the calendar trigger. That sample uses a
<input type=text>whose ID isexample1:$('#example1').datetimepicker();These are general steps for this particular case! jQuery offers much more functionality, and exploiting it may require other setups. But the example you chose is a good starting point: it’s useful and easy to understand. Boa sorte…