Change to use this pattern to create an element with jQuery, with v2 only for now,
$('<tag></tag>', {
  attribute: value
})