Not trying to steal any thunder, just providing additional information about the use of the .on() handler.
You can combine it with several other handlers to consolidate code and minimize DOM impact! For example:
$('.postal').on({
focus:setLeft, // predefined functions can be used as long as there are no parameters passed
click:function(){
alert('clicked');
},
blur:function(){
hideMe($(this)); // for functions that pass in parameters, encase them in separate functions
}
});
This is an incredibly powerful and efficient way to utilize .on(), because the DOM is only scraped once. This is better than doing different binds using the shorthand of .focus(), .click(), and .blur(), which would require the DOM being scraped with each binding.