html - Insert anchor link in :after selector content -
so i'm trying insert link after content displays literal string. how change this?
<p>blah blah blah i'm content</p>
css:
p:after { content: '- <a href="http://www.stackoverflow.com">learn more</a>' }
which produces of course text:
<!-- language: lang-none --> blah blah blah i'm content - <a href="http://www.stackoverflow.com">learn more</a>
i expect following output
blah blah blah i'm content - learn more
you need javascript kind of things.
it can done jquery. demo
html
<p id="p">blah blah blah i'm content</p>
jquery
var plink ='- <a href="http://www.stackoverflow.com">learn more</a>'; $('#p').append(plink);
Comments
Post a Comment