tags:

views:

18

answers:

1

Here's my scenario.

I have a DIV

<div class="first"></div>

if I click on an element inside this div, it generates another div, call it

<div class="second"></div>

now, can I click on an element inside second div to access the first div? does second DIV know that the first div exists?

+1  A: 

Yep, you can use .prev().

http://api.jquery.com/prev/

So, from a child of "second", you can do something like: $(this).parent("second").prev()

Fiona Holder