My current task involves utilizing jQuery DOM elements to insert a few paragraphs into a div. The following code accomplishes this successfully:
$('#detail_overlay').append($('<p />', { "class" : "detail_txt" })
.text( $('#data_div').data('paint_name') + " detail, " + $('#data_div').data('paint_date') ))
.append($('<p />', { "class" : "detail_txt" })
.text( $('#data_div').data('paint_dim' )));
The result appears as follows:
Freight Vessel on Puget Sound detail, 2013
40" x 26"
I am now faced with the challenge of italicizing the word "detail" by enclosing it in a span tag. I am struggling to find a way to include a span tag within a paragraph element.