$(function(){
$("#input" ).focus(function(){//#input replaced with the ID of your input
//Write here the code that runs after getting focus.
}).blur(function(){
// $(".scroll-question").css("display","none");
});
})
})
live It is only supported by 1.4. The following IE and Firefox are fine
< ;html xmlns="http://www.w3.org/1999/xhtml">
Untitled Document <script> <br>$(document).ready(function() <br>{ <br>$("#nameBefore").dblclick(function() <br>{ <br>$( "#nameBefore").replaceWith("<div id='nameIn'><input type='text' name='nameInVal' id='nameInVal' value='In' /></div> "); <br>} <br>); <br>//After losing focus<br>$("#nameInVal").live("blur",function() <br>{ <br>alert(' nameInVal has lost focus'); <br>} <br>); <br>} <br>); <br></script>