user3610762
user3610762

Reputation: 427

Why <svg> is not showing output in browser?

Actually I want to make a TagClouder. Thats why I have to use 'svg' tag. When I run below code then it shows nothing on the browser but if I open the 'Inspect element' then it shows that the value of '#set_texts' is 'Tag Cloud'. If I use div without using 'g' tag then its shows output in the browser but if I use 'g' tag then it shows nothing on the browser. How can I get it?

HTML :

<svg width="960" height="600">
    <g transform="translate(480,300)" id="set_texts">
    </g>
</svg>

JQuery :

$('#set_texts').text("Tag Cloud");

Upvotes: 0

Views: 87

Answers (1)

G-Cyrillus
G-Cyrillus

Reputation: 105843

If you use a <text> tag , it should work:

<svg width="960" height="600">
    <text transform="translate(480,300)" id="set_texts">
    </text>
</svg>

Upvotes: 1

Related Questions