not 100% sure if this will do the trick.........maybe one of the experts could verify
<script type="text/_javascript_">
$(document).ready(function() {
$(".item1").hover(function() {
$(this).next().addClass("shift");
}, function() {
$(this).next().removeClass("shift");
});
});
</script>
On 02/11/06, Bradford R. Bowman <
[EMAIL PROTECTED]> wrote:
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFFSlVXS64XhT7hg8YRAsTeAJ9HvKbzFImqvoweQ7vODmXSKuJ5xwCfejUa
ClvVdhn4r5rUzXITEGpGHQU=
=HuxG
-----END PGP SIGNATURE-----
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
