Dynamically change the properties of a button in the header?

Dynamically change the properties of a button in the header?

Hi, 

Im relatively new to JQM so please forgive any stupid questions I might ask!   This is a page from my site.  I want to programatically change the right button to pass an argument to the javascript function editCustomer().

how could I do this?  

thanks


  1.  <div data-role="page" id="page-customerDetails">
  2.             <div data-role="header" data-position="fixed">
  3.                 <h1>Customer Details</h1>
  4.                 <a href="#" onclick="history.go(-1);" data-transition="slidedown" data-icon="arrow-l">Back</a>
  5.                <a href='#' onClick='editCustomer();' data-icon='edit' class='ui-btn-right' data-transition='slide'>Edit</a>
  6.             </div>
  7.             <div data-role="content" id="content-customerDetails">

  8.             </div>
  9.         </div>