I have a variable with HTML and CSS value . How Can I add another HTML element inside a <span > element. Like if I want to take a <a> element inside a <span> element with different class?
var newSpan = $("<span></span>", {
title: "Double Click to Edit Groups Name",
id: "myInstance2",
style:"display:none; float:left;",
text: "Unnamed Group",
class: "title-span"
})
elementto thespanelement. Atagspecifically refers to the HTML markup that defines either the beginning or ending of a representation of thatelementin HTML.Var newSpansupposed to bevar newSpan