jQuery UI

by narensrinivasans

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
 
<p>Date: <input type="text" id="datepicker" /></p>
 
<div id="taskAmount"></div>
<p class="postAmount"></p>

<p class="openDialog">Open Dialog</p>
<div id="dialog" title="Basic dialog">
  <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>

JavaScript

$(function() {
    $( "#datepicker" ).datepicker();
    	$( "#taskAmount" ).slider({
	value:1,
	min: 1,
	max: 250,
	step: 1,
	orientation: "horizontal",
	slide: function( event, ui ) {
	$( "#taskAmountInput" ).val( ui.value );
	$(".postAmount").text(ui.value );
	}
	});
	$( "#taskAmountInput" ).val($( "#taskAmount" ).slider( "value" ) );  
      $( "#openDialog").click(function(){  $( "#dialog" ).dialog();
                                          });
  });