Sat Dec 29, 2012 9:54 pm
<html>
<head>
<title>click,dblclick,focus,blur and hover actions</title>
<script src="jquery-1.8.3.js"></script>
<script>
// Waits until the all document is loaded.
$(document).ready(function(){
// Show alert when any double click to paragraphs
$("#da").dblclick(function(){
alert("Double Click");
});
$("#da2").click(function(){
alert("Single click");
});
$("input.newa").focus(function(){
$(this).css("background-color","#CC44FF");
});
$("input.newa").blur(function(){
$(this).css("background-color","#4488F2");
});
$("#da3").hover(function(){
$(this).css("background-color","#00F0FA");
},
function(){
$(this).css("background-color","#FFFFFF");
});
});
</script>
</head>
<body>
<p id="da">Double click here to see the message</p>
<p id="da2">Single Click here to see the message</p>
<input type="text" size="50" class="newa" />
<p id="da3"> Hover on text </p>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.