blemming schrieb:
> I have a few divs on a page that are ABSOUTELY positioned inside a TD tag
> 
> <table>
> <tr>
> <td>
> <div class="color_view" style="position:absolute;">color view</div>
> < img src=".." >
> <div style="position:absolute;display:hidden;">Color Options</div></td>
> </tr>
> </table>
> 
> When the user clicks the img the second hidden div is displayed showing
> options.  When the user clicks on the option color I would like to then
> change the background color of the first div.  I can't seem to access it via
> the 
> ancestors('color_view') function because of its absolute positioning.  Is
> there any way to access via css selector or do I need to pass some sort of
> id variable?
> 
> Thanks, David

Absolute positioning has absolutely no influence on the HTML structure, 
thus it will not affect a possible selector.

Because you are talking of ancestors I assume that's the problem here. 
The second div is not an ancestor but a sibling of the other one.

Try:

prev('.color_view')

There was also missing a period in the class selector.


-- Klaus

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

Reply via email to