function openFaceBox(path) {
$.ajax({
type: "GET",
url: path,
success: function( data ) {
$.facebox( data ); // data returns html
var tableHeight = $(data).find('table').height();
console.log( tableHeight ); // Output : 0 (Zero)
}
});
}
My AJAX return html is below :
<div id="holder-1">
<h1>Content 1</h1>
</div>
<div id="holder-2">
<h1>Content 2</h1>
</div>
<div id="holder-3">
<h1>Content 3</h1>
</div>
<table>
<tr>
<td>abcd</td>
<td>Some Text Here Some Text Here Some Text Here Some Text Here
Some Text Here Some Text Here Some Text Here Some Text Here Some Text
Here Some Text Here Some Text Here Some Text Here Some Text Here Some
Text Here Some Text Here Some Text Here Some Text Here Some Text Here
Some Text Here Some Text Here Some Text Here Some Text Here Some Text
Here</td>
</tr>
</table>
I can not figure out why .find() is not working. Basically I want to find table height.Any confusion please let me know.