I have a text box for searching. For some reason, .blur() will not work on my computer. I created a test file to test it, and it still won’t work:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$('#search').blur(function() {
alert('hello');
});
</script>
</head>
<body>
<input id="search" value="hello" type="text" />
</body>
</html>
Like Dave said, try this: