Reputation: 39
Trying to copy content of table into a div, and can't make it work...
Here is sample code of the table and div
<table><tr>
<td class="movr">See this content</td>
</tr></table>
<div class="sample"></div>
and here is jquery code
$(document).ready(function(){
var move = $(".movr").html;
$(".sample").html(move);
});
Can't find the mistake..
Upvotes: 0
Views: 83
Reputation: 82241
html
is method and not property. Use .html()
instead of .html
:
var move = $(".movr").html();
Upvotes: 3