title: spinner on form submit
body: <p>I’m looking to build a script thats open a spinner on form submit or select change.</p>
  
  <p>I’d like to use spin.js, (this is a working example from the developer):</p>
  
  <p>
    </p>
  
  <p></p>
  
  <pre><code>var opts = {
    lines: 11, // The number of lines to draw
    length: 15, // The length of each line
    width: 10, // The line thickness
    radius: 30, // The radius of the inner circle
    corners: 1, // Corner roundness (0..1)
    rotate: 0, // The rotation offset
    direction: 1, // 1: clockwise, -1: counterclockwise
    color: '#000', // #rgb or #rrggbb
    speed: 0.6, // Rounds per second
    trail: 60, // Afterglow percentage
    shadow: false, // Whether to render a shadow
    hwaccel: false, // Whether to use hardware acceleration
    className: 'spinner', // The CSS class to assign to the spinner
    zIndex: 2e9, // The z-index (defaults to 2000000000)
    top: 'auto', // Top position relative to parent in px
    left: 'auto' // Left position relative to parent in px
  };
  
  var spinner = null;
  var spinner_div = 0;
  
  $(document).ready(function() {
  
    spinner_div = $('#spinner').get(0);
  
    $("#btn-spin").click(function(e) {
      e.preventDefault();
      if(spinner == null) {
        spinner = new Spinner(opts).spin(spinner_div);
      } else {
        spinner.spin(spinner_div);
      }
    });
  
   });
  </code></pre>
  
  <p></p>
  
  <p>so.. when i click on my submit button</p>
  
  <pre><code>    &lt;input id="btn-spin" type="submit" name="next" value="Continua" class="button-big"/&gt;
  </code></pre>
  
  <p>or when i change a value on my select </p>
  
  <pre><code>                &lt;select name="billing_country" onChange="this.form.submit();"&gt;
                      {billing_country_options}
                  &lt;/select&gt;
  </code></pre>
  
  <p>I’d like to:</p>
  
  <ol>
  <li>add “lightbox-is-open” and “lightbox-is-fixed” classes to HTML</li>
  <li>remove “hidden” class from my glasspane div </li>
  <li>start (or show) the spinner</li>
  <li>wait 500ms</li>
  <li>submit the button or the select (and then other page will be loaded)</li>
  </ol>
  
  <p>someone can help me please?
  it’s too hard, a very difficult puzzle for me, (i’m a sound engineer, not a web developer)</p>
  
  <p>thanks so much</p>