On Thu, Nov 02, 2006 at 11:01:26AM -0800, [EMAIL PROTECTED] wrote:
> Before we start, you might want to move the script to the <head> section.
> 
> OK, so you want to hover over some entity with class item1 and change the
> style on an entity with class item2. Here's the code:
> 
>          <script type="text/javascript">
>              $(document).ready(function() {
>                      $(".item1").hover(function() {
>                          $(.item2).addClass("shift");
>                      }, function() {
>                          $(.item2).removeClass("shift");
>                      });
> 
>              });
>          </script>
> 
> Thats how I'd do it anyways :)

Thank you for the response.  The only complication I neglected to
explain is that I want to do this for a whole series of similar entries.

So, for each in a series of nested divs like so...

<div class="item1">
  <div class="item2>
  ...
  </div>
</div>

... I would like to be able to use addClass on item2 when hovering over
item1.  I thought perhaps there was a easy way to do this sort of
selection without using some sort of for each iteration where I assign
unique class or id names to each set of nested divs.

-- 
Bradford R. Bowman <[EMAIL PROTECTED]>
GnuPG public key [0x3EE183C6] 
Available at http://pgp.mit.edu

Attachment: signature.asc
Description: Digital signature

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to