my code is here which is not returning the result i want
var content = "<div id='content_dv'>";
content += "<table border='1' style='height:auto;width:auto;'>";
content += "<tr>";
content += "<td>";
content += "This is row 1";
content += "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>";
content += "This is row 2";
content += "</td>";
content += "</tr>";
content += "<tr>";
content += "<td>";
content += "This is row 3";
content += "</td>";
content += "</tr>";
content += "</table>";
content += "</div>";
alert($(content).find('#content_dv').html());
alert("height "+$(content).find('#content_dv').height());
alert("width " + $(content).find('#content_dv').width());
my content variable has some html and i want to show the data with in div id called “content_dv” and also i need to determine the height & width of the div and height & width of inner html of div.
so please help me why my code is not working. what wrong in my code. thanks
The important thing is here the content must be appended/put to the DOM. Here how it works for me