Home  >  jQuery

Example of .blur() in jQuery

March 27, 2013
.blur() binds the event on an element. .blur() can have arguments and also it can have no arguments. With no arguments .blur() can be called as
$('#target').blur(function() {
alert('.blur() is called.');
});
 
Here target is id of any DOM element. Find example to use .blur() in jQuery.

<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<input type="text" id="s1" value="test blur"/>
 
<script>
$('#s1').blur(function() {
alert('.blur() is called.');
});
</script>
</body>
</html>
 
FIND MORE TUTORILAS






©2019 concretepage.com | Privacy Policy | Contact Us