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>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<input type="text" id="s1" value="test blur"/>
$('#s1').blur(function() {
alert('.blur() is called.');

©2022 concretepage.com | Privacy Policy | Contact Us