jQuery on a SELECT not working in IE but works in all other browsers
<p>I'm trying to get a drop down menu to set/change a class on a div depending on the value of the option selected. This works fine in all my main browsers except IE7 and 8. Any ideas what I'm doing wrong?</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript" src="/js/jquery-1.4.4.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
  $(function() {
    $('#outerwrapper').find('select').change(function () {
      var str1 = "";
      $("select option:selected").each(function () {
      str1 = $(this).attr('value');
    });
    $("#swatch").removeClass().addClass('mycssclass_' + str1);
  })
  .change();
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id="outerwrapper"&gt;
  &lt;form action="/" method="POST" name="test"&gt;
    Choose: 
    &lt;select id="in_clr" name="clr"&gt;&lt;!-- By choosing an option from this list... --&gt;
      &lt;option value="1"&gt;One&lt;/option&gt;
      &lt;option value="2"&gt;Two&lt;/option&gt;
      &lt;option value="3"&gt;Three&lt;/option&gt;
    &lt;/select&gt;
    &lt;div id="swatch"&gt;&lt;!-- I want jQuery to add a CSS class of mycssclass_1 (or 2 or 3) to this DIV --&gt;
    &lt;/div&gt;
  &lt;/form&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I have tried replacing <strong>.change</strong> with <strong>.live("change",</strong> but that doesn't seem to make any difference.</p>
