How to duplicate DIV into another DIV with jQuery?

Hello, I am new to jQuery. I want to copy a div into another div. I am trying to create a popup where I want to copy selected content. I have the following HTML.

<div class="content">
    <p>Some Content</p>

Now I want to copy the content to the div below.

<div class="popup">
    <!-- Copy the content here -->

You can use jQuery clone() method or html() method to get a copy of the element.

var elem = $('.content').clone();


var elem = $('.content').html();

Note, if html() method is empty then it will get an element but if you pass some data then it will set the HTML value