Handling partial postbacks : Alternative to rebinding in endRequest

Handling partial postbacks : Alternative to rebinding in endRequest

I am attaching the jQuery Plugin price_format.1.3 to a textbox in my document ready to format the incoming text.  On the page I also have a button inside an update panel that causes a partial postback when it is clicked.  After the button has been clicked, the price_format plugin stops working unless I rebind it inside of the end request.  

Here is the code I have inside of my document ready:
  1. $("#<%=txtbShares.ClientID%>").priceFormat({
  2. prefix: '',
  3. centsSeparator: '.',
  4. thousandsSeparator: ',',
  5. centsLimit: 3
  6. });

  7. var prm = Sys.WebForms.PageRequestManager.getInstance();
  8. prm.add_endRequest(function() {
  9. $("#<%=txtbShares.ClientID%>").priceFormat({
  10. prefix: '',
  11. centsSeparator: '.',
  12. thousandsSeparator: ',',
  13. centsLimit: 3
  14. });

Adding the priceFormat a second time inside of the endRequest function achieves the desired behavior.  Still, I'd like to avoid rebinding my controls on the page if possible.

My next thought is to use .live().  I attached my event in the document ready like so:

  1. $("#<%=txtbShares.ClientID%>").live('focus', function() {
  2. $(this).priceFormat({
  3. prefix: '',
  4. centsSeparator: '.',
  5. thousandsSeparator: ',',
  6. centsLimit: 3
  7. });
  8. });
This fixes the issue with the partial postback but introduces a new issue.  If I type in the textbox once the formatting is applied correctly.  However, if after using another control on the page I go back to the textbox and begin typing my entries are duplicated (3 becomes 33).  If I visit yet another control and come back I get three times the characters I enter.

Does anyone have an elegant solution to resolve this issue?