title: FineUploader : add upload buttons in template markup
body: <p>With the fineUploader jQuery plugin, I am trying to add several upload buttons in my fineUploader template.</p>
  
  <p>But it seems that the <code>extraButtons</code> option does not look for elements inside the template, only inside the DOM, before the template is being added to the DOM.</p>
  
  <p><a href="http://docs.fineuploader.com/features/extra-buttons.html" rel="nofollow">http://docs.fineuploader.com/features/extra-buttons.html</a></p>
  
  <p>So if the extraButtons elements are inside the template, fineUploader does not find them.</p>
  
  <p>I don't want to add my buttons outside my template ... Can fineUploader target extraButtons inside a template ?</p>
  
  <p>My fineUploader instanciation looks like this :</p>
  
  <pre><code>$("#fine-uploader").fineUploader({
          debug : true,
          extraButtons: [
              {element: $('#upload-pictures-btn1')},
              {element: $('#upload-pictures-btn2')},
              {element: $('#upload-pictures-btn3')}
          ],
          request: {
              endpoint: '/publish/upload'
          }
      });
  </code></pre>
  
  <p>And my fineUploader template looks like this :</p>
  
  <pre><code>&lt;script type="text/template" id="qq-template"&gt;
  &lt;div class="qq-uploader-selector qq-uploader"&gt;
      &lt;div class="qq-upload-drop-area-selector qq-upload-drop-area" qq-hide-dropzone&gt;
          &lt;span class="qq-upload-drop-area-text-selector"&gt;&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="qq-upload-button-selector qq-upload-button"&gt;
          Add file
      &lt;/div&gt;
  
      &lt;div class="upload-pictures-btns"&gt;
          &lt;div id="upload-pictures-btn1"&gt;&lt;/div&gt;
          &lt;div id="upload-pictures-btn2"&gt;&lt;/div&gt;
          &lt;div id="upload-pictures-btn3"&gt;&lt;/div&gt;
      &lt;/div&gt;
  
      &lt;span class="qq-drop-processing-selector qq-drop-processing"&gt;
          &lt;span&gt;Uploading ...&lt;/span&gt;
          &lt;span class="qq-drop-processing-spinner-selector qq-drop-processing-spinner"&gt;&lt;/span&gt;
      &lt;/span&gt;
      &lt;ul class="qq-upload-list-selector qq-upload-list" aria-live="polite" aria-relevant="additions removals"&gt;
          &lt;li&gt;
              &lt;div class="qq-progress-bar-container-selector"&gt;
                  &lt;div role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" class="qq-progress-bar-selector qq-progress-bar"&gt;&lt;/div&gt;
              &lt;/div&gt;
  
              &lt;span class="qq-upload-thumb"&gt;
                  &lt;span class="qq-upload-spinner-selector qq-upload-spinner"&gt;&lt;/span&gt;
                  &lt;img class="qq-thumbnail-selector" qq-max-size="365" qq-server-scale&gt;
              &lt;/span&gt;
  
              &lt;span class="qq-upload-info"&gt;
                  &lt;span class="qq-upload-file-selector qq-upload-file"&gt;&lt;/span&gt;
                  &lt;span class="qq-edit-filename-icon-selector qq-edit-filename-icon" aria-label="Edit filename"&gt;&lt;/span&gt;
                  &lt;input class="qq-edit-filename-selector qq-edit-filename" tabindex="0" type="text"&gt;
                  &lt;span class="qq-upload-size-selector qq-upload-size"&gt;&lt;/span&gt;
              &lt;/span&gt;
  
              &lt;span class="qq-btns-wrapper"&gt;
                  &lt;button type="button" class="btn qq-btn qq-upload-cancel-selector qq-upload-cancel"&gt;Annuler&lt;/button&gt;
                  &lt;button type="button" class="btn qq-btn qq-upload-retry-selector qq-upload-retry"&gt;Re-essayer&lt;/button&gt;
                  &lt;button type="button" class="btn qq-btn qq-upload-delete-selector qq-upload-delete"&gt;Supprimer&lt;/button&gt;
              &lt;/span&gt;
  
              &lt;span role="status" class="qq-upload-status-text-selector qq-upload-status-text"&gt;&lt;/span&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>JS error at instanciation : <code>Uncaught TypeError: Cannot read property 'style' of undefined</code></p>
  
  <p>If I move the 3 extra buttons out of the template, and put them directly in my HTML markup, it works. But I need them to be IN the template.</p>