jQuery selector question -
i need append html this
<div id="table_div"> <h1> <font color="grey"> <span>spend</span> </font> </h1> </div>
becomes this
<div id="table_div"> <h1> <font color="grey"> <span>spend</span> <span>new word</span> </font> </h1> </div>
there multiples of these divs, different div ids, selector has begin div id. how can write selector this?
give go. .after function appends content after matching elements (see http://api.jquery.com/after/)
$("#table_div span:last").after("<span>new word</span>");
Comments
Post a Comment