title: Can you use selected="selected" to auto select selectize.js on load?
body: <p>I'm working on a project where every select field is expected to use selectize.js. There can be any number of select fields on the page and I never know so it has to be abstract.</p>
  
  <p>The init is very simple:</p>
  
  <pre><code>$('.selectize').selectize({
      create: true
  });
  </code></pre>
  
  <p>You'd think the default selected value of any given select would be used when selectize inits...</p>
  
  <pre><code>&lt;select class="selectize"&gt;
      &lt;option value="1"&gt;Option 1&lt;/option&gt;
      &lt;option value="2"&gt;Option 2&lt;/option&gt;
      &lt;option value="3" selected="selected"&gt;Option 3&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>But for some reason selectize only sets the first option as selected when init runs.</p>
  
  <p>Am I missing something in the docs? Or does selectize really not use the selected attribute from html?</p>
  
  <p>This also doesn't work when using <code>&lt;option value="3" selected&gt;</code></p>
  
  <p>To clarify, this is a data filtering utility where clicking directional filters, select boxes, etc are expected to reload the page while maintaining all selections. Thus, I have to rely on PHP GET params to set the selected items. That part is working as expected and I have verified that by disabling selectize.</p>
  
  <p><strong>EDIT</strong>
  as requested, this is all standard implementation. Selectize works fine, no console errors. It just inits with only the first value selected.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>As answered below, you can use selected but for reasons unknown I can't in my setup. Must be a conflict somewhere. Anyhow, if anyone else has this issue, this is how I resolved mine. On my init, I loop through each select that has a matching get param and set it by comparing against the get value. The sample is here, which is not complete code but enough to get someone running...</p>
  
  <pre><code>var ss = $('#some-select').selectize();
  var selectize = ss[0].selectize;
  selectize.setValue(selectize.search(get_value).items[0].id);
  </code></pre>