Total members 11895 |It is currently Sat Dec 21, 2024 12:58 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Code:
<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>




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : click,double click,focus,blur and hover actions in JQuery
 disable right click on your web page     -  
 Hide the background image by one click     -  
 Show image when click on link     -  
 Detecting right mouse button click     -  
 Javascript Code For Moving Images On Click Of A Button     -  
 Draw Circles using using Polar form equations-On mouse Click     -  
 Draw Bezier Curve and selecting the points with mouse click     -  
 Show hint when focus on html element using JQuery     -  
 table row hover     -  
 form-Radio-buttons-checkBoxs-actions-HTML-Tags     -  



Topic Tags

JQuery Selector
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
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