I have a line that creates a simple box like so:
var box = $('<button>').addClass('box');
.box {
border-radius: 0.7vw;
width: 40vw;
height: 50vw;
margin: 30px;
display: inline-block;
background-color: #d87c2d;
}
<div>
<div class="tile" id="eventName"> Event name</div><br/>
<div class="tile" id="eventDate">2017.01.01. </div>
<div class="tile" id="eventTime">12.00</div><br/>
<div class="tile" id="description">Some boring example description about the meaningless </div>
</div>
$(-here-)
<button>
var box = $('/html/tileInside').addClass('box');
string
string
Use ajax here.
$('<div></div>').load('/html/tileInside');