I’ve made a row striped table using divs instead of tables (I hate tables). I want to make it so that if I click on one of the divs I can grab one of its childs values.
<div class='row'><!-- I want to click this div -->
<p>I want this value</p>
<p>some other val</p>
</div>
<div class='row'>
<p>I don't want this one</p>
<p>some other val</p>
</div>
Let me know if you have a answer.
Of course, you’ll probably want to mark your inner values a little better to fix the inner
find()selector. Example:Then you could use
$(this).find('.row-value').text()and feel better about the selector not breaking.