title: jQuery UI Custom Dialog Buttons
body: <p>I am working in jQuery UI and am trying to figure out a way for a way to pass in custom data fields through the buttons options array. I would like to pass in fields like the example below. data-example &amp; data-example2. Is this possible to do through the buttons param??</p>
  
  <pre><code>&lt;button type="button" data-example="XXXX" data-example2="YYYY" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false" &gt;&lt;span class="ui-button-text"&gt;xxx&lt;/span&gt;&lt;/button&gt;
  </code></pre>
  
  <p>here is my create dialog code - </p>
  
  <pre><code>options = {
                  autoOpen: true,
                  buttons : [
                      {text:"example1"},
                      {text:"example2"}
                  ]
              }
  jQuery("&lt;div class='dialog' title='xxx'&gt;&lt;p&gt;xxx&lt;/p&gt;&lt;/div&gt;")
              .dialog(options);
  </code></pre>
  
  <p><a href="http://api.jqueryui.com/dialog/#option-buttons" rel="nofollow">http://api.jqueryui.com/dialog/#option-buttons</a> </p>