In that case $(this).prev(".seriesOverlay") should do.
- Richard
On Fri, Jun 27, 2008 at 12:27 PM, hubbs <[EMAIL PROTECTED]> wrote:
>
> This is almost what I need. But .seriesOverlay is not a child, but
> the previous div in the DOM, so it is right above it.
>
> Maybe I could use $(".seriesOver
This is almost what I need. But .seriesOverlay is not a child, but
the previous div in the DOM, so it is right above it.
Maybe I could use $(".seriesOverlay + .seriesItem")?
On Jun 26, 2:47 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> If your .seriesOverlay is a child of your .seriesItem
If your .seriesOverlay is a child of your .seriesItem[1], you can do:
$(".seriesItem").mouseover(function() {
$(".seriesOverlay", this).hide();
}).mouseout(function() {
$(".seriesOverlay", this).show();
});
Why this works:
* The thisArg in jQuery callbacks is always equal to the original elem
Add a class to your IDs, then it should work:
[code]
div {border:1px solid #ccc;width: 100px;height:100px;margin:
10px;float:left;}