Tuesday, 15 May 2012

How to append existing html Header tag in javascript/jQuery with some text and setting its font size? -



How to append existing html Header tag in javascript/jQuery with some text and setting its font size? -

this question has reply here:

how can append <h1> tag within span jquery? 4 answers

i want show header content "rolling app hello, sanjayb" rolling app static content left side of header whereas hello, sanjayb i.e. appended text should @ right side of header font size 10.

i trying no luck

$("#mainheader").html("<h2>rolling app </h2>"+"<p font-size: 5px;>"+appusername+"</p>");

try :

$(function(){ $("#mainheader").append("<h2>rolling app " +"<span style='font-size:10pt;'>" +appusername+"</span></h2>"); });

working jsfiddle

javascript jquery html5

No comments:

Post a Comment