I stuck on stranger issue on blur and onblur event on jquery. When you blur on input then onblur event execute first and .blur method. But when you call trigger .blur by clicling on anchor tag then .blur method execute first then onblur event. why this difference and any solution for this.Demo
<head>
<script type="text/javascript" src="jquery-1.8.3.js"></script>
<script type="text/javascript">
$(function () {
$('a').click(function () {
$('input').blur();
})
})
function test() {
alert(0);
}
$(function () {
$('input').blur(function () {
alert(1);
})
})
</script>
</head>
<body>
<input type="text" onblur="test()" />
<a href="#">blur input</a>
</body>