$(".guide").focus(function(){
$(this).removeClass("guide").val("");
});
I just need to know if there's something else I need to do to free up the event handler, or is it fine?
You can also use jQuery.fn.one for an event handler which is called once and then automatically detached.
$(".guide").one("focus", function(){
$(this).removeClass("guide").val("");
});
one() handler. Cool!Not quite sure what you mean by 'free up the event handler' but I will guess..
Removing the class would work only if you are using a .delegate handler. In your situation where you explicitly attach the handler to elements you need to .unbind the handler from the element.
If you have a number of elements with a class of guide in a form then you will be best using delegate as follows
$('.guide').delegate('form', 'focus', function(){
$(this).removeClass("guide").val("");
});
.blur()event?