I've updated my code since the previous post, here's where I'm at -
though it still doesn't work!  I think the problem is around my each()
function call?


<script type='text/javascript'>
          $(document).ready(function() {
                  $('div.hidden').hide();
                  $('#node-58 select.state').change(function () {
                          $(this).find("option:selected").each(function () {
                                  var equiv = $('#' + this.val);
                                  if(equiv.length){
                                        equiv.show();
                                  }
                          });
                  });
          });
</script>

>
> Explanation: I have a bunch of divs with class 'hidden' that
> automatically have to hide. Those divs also have IDs each
> corresponding to a CLASS on an <option> tag within a <select> box.
> The idea is that when you choose an option with class ".foo" it will
> show the div with ID "#foo".
>
> So far my .hidden divs get hidden, but they never get activated by the
> select box.

Reply via email to