<!DOCTYPE html>
<html>
<head>
<link data-require="bootstrap-css@*" data-semver="3.3.6" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css" />
<script data-require="jquery@*" data-semver="2.2.0" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<button id="button1">Copy from Div1</button>
<div id="div1"><p>My text</p></div>
<div id="div2">Div2 Placeholder Text</div>
<script>
var myVar;
$( "#button1" ).click(function() {
// If you want to store the data in another HTML element
$( "#div2" ).html( $( "#div1" ).html() );
// If you want to store the data in a js var
myVar = $( "#div1" ).html();
});
</script>
</body>
</html>
// Code goes here
/* Styles go here */