$(document).ready(function() { // attach a handler to an event for the elements $("#demo").bind('blur', function(e) { //dom event fired }); });