javascript - Create Hyperlink, add to body and then Add string beside Hyperlink -


i want create hyperlink using jquery name "dashboard" , add label beside hyperlink name " >> category".

so, string " dashboard >> category " dashboard underlined.

how can using jquery ?

var link = $('<a>dashboard</a>')   .appendto($('body'));   $('<label>&nbsp;&gt;&gt; category</label>').insertafter(link); 

but david thomas points out, label not best tag use this. try <span> instead.

var link = $('<a>dashboard</a>')   .appendto($('body'));   $('<span>&nbsp;&gt;&gt; category</span>').insertafter(link); 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -