Pergunta

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");
Foi útil?

Solução

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

<svg width="960" height="600">
    <text transform="translate(480,300)" id="set_texts">
    </text>
</svg>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top