I'm trying to use jQuery selector to access the DOM deep inside.
HTML
<table>
...more stuff here
<tr>
<td class="foo bar clickable">
<div>
<div class="number">111</div> //I want to get the value "111"
<div class="content"></div>
</div>
</td>
<td class="foo2 bar2 clickable">
<div>
<div class="number">222</div>
<div class="content"></div>
</div>
</td>
</tr>
...more stuff here
</table>
So a user clicks on td and then I want to popup the alert with "111" shown.
In order to access <div class="number">111</div> part, I wrote the jQuery selector:
j$(".clickable").click(function() {
//trying to output 111
alert( j$("this div div.number").text());
}
which returns blank alert box.
alert( j$("this div.number").text());
alert( j$("this div .number").text());
Tried few combination I can think of and all gave me blank alert. What am I doing wrong?