title: Google FastButton Multiple Use
body: <p>I've implemented the Google FastButton script into a web page.  Following:</p>
  
  <p><a href="https://stackoverflow.com/questions/6300136/trying-to-implement-googles-fast-button">Trying to implement Google&#39;s Fast Button</a></p>
  
  <p>The code works great.  My question is how do I implement this for multiple buttons.  I have several buttons that are dynamically created. I don't want to define each button with its own function.  Can I use this script with another function that passes some variable.</p>
  
  <p>For example, <code>&lt;button id="quick" onclick="someFunction(24);"&gt;button&lt;/button&gt;</code></p>
  
  <p>Current implementation</p>
  
  <pre><code>new FastButton(document.getElementById('quick'), function() {
         alert("hello");
      });
  &lt;button onclick="onLayerClick(8)"&gt;8&lt;/button&gt;
  </code></pre>