jQuery append text inside of an existing paragraph tag

The Solution to jQuery append text inside of an existing paragraph tag is


Try this...

$('p').append('<span id="add_here">new-dynamic-text</span>');

OR if there is an existing span, do this.

$('p').children('span').text('new-dynamic-text');

DEMO

~ Answered on 2013-04-25 03:22:32


Most Viewed Questions: