How can I merge <div class="tile"> with another <div class="tile">? [closed]

This works for me. Is it what you meant? $(function() { var html = $(“.tile”).map(function() { return $(this).html(); }).get() $(“.tile”).eq(0).html(html).css({ “width”: “300px”, “background”: “#012496” }); $(“.tile:gt(0)”).remove(); }); div.tile { float: left; width: 100px; height: 50px; border: 3px solid yellow; text-align:center; } div.tile1 { float: left; width: 100px; height: 50px; border: 3px solid yellow; text-align:center; } … Read more