Thursday, 7 February 2013

Display Calendar on Continous Pressing of key C , Jquery UI

<!doctype html>
<html lang="en">
<head>
 <meta charset="utf-8" /> 
 <title>Press C continously</title>
 <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" /> 
 <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
 <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>

<script>
 

var ss=0;
$(document).keypress("c",function(e) {
   if(ss==3)
{
 $( ".showcalender" ).datepicker(); 
ss=0;
}
else
{
ss++;
}
   
});
$(document).keyup("c",function(e) {
ss=0;
   
});
</script>
</head>
<body>
  
<div class='showcalender' style='left:30%;top:20%;position:fixed'></div>

</body>

</html>

No comments:

Post a Comment

IE7 Issues Text Indent

                 Unfortunately IE 7 is still widespread among the users hence while theming we have to give special importance to the grea...