Elements visible only from Inspector, SVG










0














I've tried to create more circles with button, but it doesnt work. Theyre shown in the Mozilla Inspector after click:



inspector
but theyre not visible for me. I've seen similiar problems here, but there wasn't single one that works. Can you help me please? Atm I have no idea what to do.



circle.js



class Circle 
constructor(id, posx, posy, r, fill)
this.id = id;
this.posx = posx;
this.posy = posy;
this.r = r;
this.fill = fill;



creator.js



function createCircle() 

let color = ["blue", "black", "red", "green", "purple", "orange", "yellow"]
const circle = new Circle("node", 100, 100, 50, color[0]);

var node = document.createElement("CIRCLE");
node.setAttribute("id", "node");
node.setAttribute("cx", circle.posx);
node.setAttribute("cy", circle.posy);
node.setAttribute("r", circle.r);
node.setAttribute("fill", circle.fill);
document.getElementById("frame").appendChild(node);

console.log(circle.fill);


body and from index.html



<body onload="myFunction()">
<svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
<circle id="circle0" cx="100" cy="100" r="50" fill="black" />
</svg>
</svg>
<button onclick="createCircle()">Create circle</button></body>









share|improve this question





















  • And btw, first circle is visible from the start: "<circle id="circle0" cx="100" cy="100" r="50" fill="black" />" Only next ones doesnt work.
    – Wojciech Kubiak
    Nov 10 at 1:10
















0














I've tried to create more circles with button, but it doesnt work. Theyre shown in the Mozilla Inspector after click:



inspector
but theyre not visible for me. I've seen similiar problems here, but there wasn't single one that works. Can you help me please? Atm I have no idea what to do.



circle.js



class Circle 
constructor(id, posx, posy, r, fill)
this.id = id;
this.posx = posx;
this.posy = posy;
this.r = r;
this.fill = fill;



creator.js



function createCircle() 

let color = ["blue", "black", "red", "green", "purple", "orange", "yellow"]
const circle = new Circle("node", 100, 100, 50, color[0]);

var node = document.createElement("CIRCLE");
node.setAttribute("id", "node");
node.setAttribute("cx", circle.posx);
node.setAttribute("cy", circle.posy);
node.setAttribute("r", circle.r);
node.setAttribute("fill", circle.fill);
document.getElementById("frame").appendChild(node);

console.log(circle.fill);


body and from index.html



<body onload="myFunction()">
<svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
<circle id="circle0" cx="100" cy="100" r="50" fill="black" />
</svg>
</svg>
<button onclick="createCircle()">Create circle</button></body>









share|improve this question





















  • And btw, first circle is visible from the start: "<circle id="circle0" cx="100" cy="100" r="50" fill="black" />" Only next ones doesnt work.
    – Wojciech Kubiak
    Nov 10 at 1:10














0












0








0







I've tried to create more circles with button, but it doesnt work. Theyre shown in the Mozilla Inspector after click:



inspector
but theyre not visible for me. I've seen similiar problems here, but there wasn't single one that works. Can you help me please? Atm I have no idea what to do.



circle.js



class Circle 
constructor(id, posx, posy, r, fill)
this.id = id;
this.posx = posx;
this.posy = posy;
this.r = r;
this.fill = fill;



creator.js



function createCircle() 

let color = ["blue", "black", "red", "green", "purple", "orange", "yellow"]
const circle = new Circle("node", 100, 100, 50, color[0]);

var node = document.createElement("CIRCLE");
node.setAttribute("id", "node");
node.setAttribute("cx", circle.posx);
node.setAttribute("cy", circle.posy);
node.setAttribute("r", circle.r);
node.setAttribute("fill", circle.fill);
document.getElementById("frame").appendChild(node);

console.log(circle.fill);


body and from index.html



<body onload="myFunction()">
<svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
<circle id="circle0" cx="100" cy="100" r="50" fill="black" />
</svg>
</svg>
<button onclick="createCircle()">Create circle</button></body>









share|improve this question













I've tried to create more circles with button, but it doesnt work. Theyre shown in the Mozilla Inspector after click:



inspector
but theyre not visible for me. I've seen similiar problems here, but there wasn't single one that works. Can you help me please? Atm I have no idea what to do.



circle.js



class Circle 
constructor(id, posx, posy, r, fill)
this.id = id;
this.posx = posx;
this.posy = posy;
this.r = r;
this.fill = fill;



creator.js



function createCircle() 

let color = ["blue", "black", "red", "green", "purple", "orange", "yellow"]
const circle = new Circle("node", 100, 100, 50, color[0]);

var node = document.createElement("CIRCLE");
node.setAttribute("id", "node");
node.setAttribute("cx", circle.posx);
node.setAttribute("cy", circle.posy);
node.setAttribute("r", circle.r);
node.setAttribute("fill", circle.fill);
document.getElementById("frame").appendChild(node);

console.log(circle.fill);


body and from index.html



<body onload="myFunction()">
<svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
<circle id="circle0" cx="100" cy="100" r="50" fill="black" />
</svg>
</svg>
<button onclick="createCircle()">Create circle</button></body>






javascript svg






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 1:09









Wojciech Kubiak

11




11











  • And btw, first circle is visible from the start: "<circle id="circle0" cx="100" cy="100" r="50" fill="black" />" Only next ones doesnt work.
    – Wojciech Kubiak
    Nov 10 at 1:10

















  • And btw, first circle is visible from the start: "<circle id="circle0" cx="100" cy="100" r="50" fill="black" />" Only next ones doesnt work.
    – Wojciech Kubiak
    Nov 10 at 1:10
















And btw, first circle is visible from the start: "<circle id="circle0" cx="100" cy="100" r="50" fill="black" />" Only next ones doesnt work.
– Wojciech Kubiak
Nov 10 at 1:10





And btw, first circle is visible from the start: "<circle id="circle0" cx="100" cy="100" r="50" fill="black" />" Only next ones doesnt work.
– Wojciech Kubiak
Nov 10 at 1:10













2 Answers
2






active

oldest

votes


















0














@gdanielyan's answer is a good answer. Here is a demo:






class Circle 
constructor(id, posx, posy, r, fill)
this.id = id;
this.posx = posx;
this.posy = posy;
this.r = r;
this.fill = fill;


function createCircle()

let color = ["blue", "red", "green", "purple", "orange", "yellow"]
const circle = new Circle("node", 100, 100, 50, color[0]);

var node = document.createElementNS("http://www.w3.org/2000/svg","circle");
node.setAttributeNS(null,"id", "node");
node.setAttributeNS(null,"cx", circle.posx + Math.random()*100);
node.setAttributeNS(null,"cy", circle.posy + Math.random()*100);
node.setAttributeNS(null,"r", circle.r);
let _color=color[~~(Math.random()*(color.length))];
//console.log(_color)
node.setAttributeNS(null,"fill", _color);
document.getElementById("frame").appendChild(node);

<svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
<circle id="circle0" cx="100" cy="100" r="50" fill="black" />
</svg>
</svg>
<button onclick="createCircle()">Create circle</button>








share|improve this answer




























    2














    SVG elements are from a different namespace than typical HTML elements. An HTML document can mix tags from different XML dialects, for example XHTML, which are the standard HTML elements, but also different dialects as well, like the SVG namespace. In order to create the right element from the correct namespace you need to use a different JavaScript method that lets you specify the namespace:



    document.createElementNS(namespace, element);


    The first argument is the namespace so you should use: "http://www.w3.org/2000/svg", and the second is the element, in this case "circle". So try:



    var node = document.createElementNS("http://www.w3.org/2000/svg", "circle");


    If you're more interested, check out MDN docs:



    https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course



    https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS






    share|improve this answer






















    • Yea I did this and nothing changed. Is this maybe problem with my <body> ?
      – Wojciech Kubiak
      Nov 10 at 1:55










    • Or wait, it works... But why? I did it before.
      – Wojciech Kubiak
      Nov 10 at 2:00










    • Glad it works. Your index.html should have <head> and <html> tags as well. Also, you have an inline function call to myFunction() in the body tag, not sure if you're actually defining that somewhere else.
      – gdanielyan
      Nov 10 at 2:14










    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53235169%2felements-visible-only-from-inspector-svg%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    @gdanielyan's answer is a good answer. Here is a demo:






    class Circle 
    constructor(id, posx, posy, r, fill)
    this.id = id;
    this.posx = posx;
    this.posy = posy;
    this.r = r;
    this.fill = fill;


    function createCircle()

    let color = ["blue", "red", "green", "purple", "orange", "yellow"]
    const circle = new Circle("node", 100, 100, 50, color[0]);

    var node = document.createElementNS("http://www.w3.org/2000/svg","circle");
    node.setAttributeNS(null,"id", "node");
    node.setAttributeNS(null,"cx", circle.posx + Math.random()*100);
    node.setAttributeNS(null,"cy", circle.posy + Math.random()*100);
    node.setAttributeNS(null,"r", circle.r);
    let _color=color[~~(Math.random()*(color.length))];
    //console.log(_color)
    node.setAttributeNS(null,"fill", _color);
    document.getElementById("frame").appendChild(node);

    <svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
    <circle id="circle0" cx="100" cy="100" r="50" fill="black" />
    </svg>
    </svg>
    <button onclick="createCircle()">Create circle</button>








    share|improve this answer

























      0














      @gdanielyan's answer is a good answer. Here is a demo:






      class Circle 
      constructor(id, posx, posy, r, fill)
      this.id = id;
      this.posx = posx;
      this.posy = posy;
      this.r = r;
      this.fill = fill;


      function createCircle()

      let color = ["blue", "red", "green", "purple", "orange", "yellow"]
      const circle = new Circle("node", 100, 100, 50, color[0]);

      var node = document.createElementNS("http://www.w3.org/2000/svg","circle");
      node.setAttributeNS(null,"id", "node");
      node.setAttributeNS(null,"cx", circle.posx + Math.random()*100);
      node.setAttributeNS(null,"cy", circle.posy + Math.random()*100);
      node.setAttributeNS(null,"r", circle.r);
      let _color=color[~~(Math.random()*(color.length))];
      //console.log(_color)
      node.setAttributeNS(null,"fill", _color);
      document.getElementById("frame").appendChild(node);

      <svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
      <svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
      <circle id="circle0" cx="100" cy="100" r="50" fill="black" />
      </svg>
      </svg>
      <button onclick="createCircle()">Create circle</button>








      share|improve this answer























        0












        0








        0






        @gdanielyan's answer is a good answer. Here is a demo:






        class Circle 
        constructor(id, posx, posy, r, fill)
        this.id = id;
        this.posx = posx;
        this.posy = posy;
        this.r = r;
        this.fill = fill;


        function createCircle()

        let color = ["blue", "red", "green", "purple", "orange", "yellow"]
        const circle = new Circle("node", 100, 100, 50, color[0]);

        var node = document.createElementNS("http://www.w3.org/2000/svg","circle");
        node.setAttributeNS(null,"id", "node");
        node.setAttributeNS(null,"cx", circle.posx + Math.random()*100);
        node.setAttributeNS(null,"cy", circle.posy + Math.random()*100);
        node.setAttributeNS(null,"r", circle.r);
        let _color=color[~~(Math.random()*(color.length))];
        //console.log(_color)
        node.setAttributeNS(null,"fill", _color);
        document.getElementById("frame").appendChild(node);

        <svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
        <circle id="circle0" cx="100" cy="100" r="50" fill="black" />
        </svg>
        </svg>
        <button onclick="createCircle()">Create circle</button>








        share|improve this answer












        @gdanielyan's answer is a good answer. Here is a demo:






        class Circle 
        constructor(id, posx, posy, r, fill)
        this.id = id;
        this.posx = posx;
        this.posy = posy;
        this.r = r;
        this.fill = fill;


        function createCircle()

        let color = ["blue", "red", "green", "purple", "orange", "yellow"]
        const circle = new Circle("node", 100, 100, 50, color[0]);

        var node = document.createElementNS("http://www.w3.org/2000/svg","circle");
        node.setAttributeNS(null,"id", "node");
        node.setAttributeNS(null,"cx", circle.posx + Math.random()*100);
        node.setAttributeNS(null,"cy", circle.posy + Math.random()*100);
        node.setAttributeNS(null,"r", circle.r);
        let _color=color[~~(Math.random()*(color.length))];
        //console.log(_color)
        node.setAttributeNS(null,"fill", _color);
        document.getElementById("frame").appendChild(node);

        <svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
        <circle id="circle0" cx="100" cy="100" r="50" fill="black" />
        </svg>
        </svg>
        <button onclick="createCircle()">Create circle</button>








        class Circle 
        constructor(id, posx, posy, r, fill)
        this.id = id;
        this.posx = posx;
        this.posy = posy;
        this.r = r;
        this.fill = fill;


        function createCircle()

        let color = ["blue", "red", "green", "purple", "orange", "yellow"]
        const circle = new Circle("node", 100, 100, 50, color[0]);

        var node = document.createElementNS("http://www.w3.org/2000/svg","circle");
        node.setAttributeNS(null,"id", "node");
        node.setAttributeNS(null,"cx", circle.posx + Math.random()*100);
        node.setAttributeNS(null,"cy", circle.posy + Math.random()*100);
        node.setAttributeNS(null,"r", circle.r);
        let _color=color[~~(Math.random()*(color.length))];
        //console.log(_color)
        node.setAttributeNS(null,"fill", _color);
        document.getElementById("frame").appendChild(node);

        <svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
        <circle id="circle0" cx="100" cy="100" r="50" fill="black" />
        </svg>
        </svg>
        <button onclick="createCircle()">Create circle</button>





        class Circle 
        constructor(id, posx, posy, r, fill)
        this.id = id;
        this.posx = posx;
        this.posy = posy;
        this.r = r;
        this.fill = fill;


        function createCircle()

        let color = ["blue", "red", "green", "purple", "orange", "yellow"]
        const circle = new Circle("node", 100, 100, 50, color[0]);

        var node = document.createElementNS("http://www.w3.org/2000/svg","circle");
        node.setAttributeNS(null,"id", "node");
        node.setAttributeNS(null,"cx", circle.posx + Math.random()*100);
        node.setAttributeNS(null,"cy", circle.posy + Math.random()*100);
        node.setAttributeNS(null,"r", circle.r);
        let _color=color[~~(Math.random()*(color.length))];
        //console.log(_color)
        node.setAttributeNS(null,"fill", _color);
        document.getElementById("frame").appendChild(node);

        <svg id="sss" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
        <svg id="frame" width="1020px" height="820px" viewBox="0 0 1020 820">
        <circle id="circle0" cx="100" cy="100" r="50" fill="black" />
        </svg>
        </svg>
        <button onclick="createCircle()">Create circle</button>






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 10 at 8:30









        enxaneta

        5,4062415




        5,4062415























            2














            SVG elements are from a different namespace than typical HTML elements. An HTML document can mix tags from different XML dialects, for example XHTML, which are the standard HTML elements, but also different dialects as well, like the SVG namespace. In order to create the right element from the correct namespace you need to use a different JavaScript method that lets you specify the namespace:



            document.createElementNS(namespace, element);


            The first argument is the namespace so you should use: "http://www.w3.org/2000/svg", and the second is the element, in this case "circle". So try:



            var node = document.createElementNS("http://www.w3.org/2000/svg", "circle");


            If you're more interested, check out MDN docs:



            https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course



            https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS






            share|improve this answer






















            • Yea I did this and nothing changed. Is this maybe problem with my <body> ?
              – Wojciech Kubiak
              Nov 10 at 1:55










            • Or wait, it works... But why? I did it before.
              – Wojciech Kubiak
              Nov 10 at 2:00










            • Glad it works. Your index.html should have <head> and <html> tags as well. Also, you have an inline function call to myFunction() in the body tag, not sure if you're actually defining that somewhere else.
              – gdanielyan
              Nov 10 at 2:14















            2














            SVG elements are from a different namespace than typical HTML elements. An HTML document can mix tags from different XML dialects, for example XHTML, which are the standard HTML elements, but also different dialects as well, like the SVG namespace. In order to create the right element from the correct namespace you need to use a different JavaScript method that lets you specify the namespace:



            document.createElementNS(namespace, element);


            The first argument is the namespace so you should use: "http://www.w3.org/2000/svg", and the second is the element, in this case "circle". So try:



            var node = document.createElementNS("http://www.w3.org/2000/svg", "circle");


            If you're more interested, check out MDN docs:



            https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course



            https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS






            share|improve this answer






















            • Yea I did this and nothing changed. Is this maybe problem with my <body> ?
              – Wojciech Kubiak
              Nov 10 at 1:55










            • Or wait, it works... But why? I did it before.
              – Wojciech Kubiak
              Nov 10 at 2:00










            • Glad it works. Your index.html should have <head> and <html> tags as well. Also, you have an inline function call to myFunction() in the body tag, not sure if you're actually defining that somewhere else.
              – gdanielyan
              Nov 10 at 2:14













            2












            2








            2






            SVG elements are from a different namespace than typical HTML elements. An HTML document can mix tags from different XML dialects, for example XHTML, which are the standard HTML elements, but also different dialects as well, like the SVG namespace. In order to create the right element from the correct namespace you need to use a different JavaScript method that lets you specify the namespace:



            document.createElementNS(namespace, element);


            The first argument is the namespace so you should use: "http://www.w3.org/2000/svg", and the second is the element, in this case "circle". So try:



            var node = document.createElementNS("http://www.w3.org/2000/svg", "circle");


            If you're more interested, check out MDN docs:



            https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course



            https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS






            share|improve this answer














            SVG elements are from a different namespace than typical HTML elements. An HTML document can mix tags from different XML dialects, for example XHTML, which are the standard HTML elements, but also different dialects as well, like the SVG namespace. In order to create the right element from the correct namespace you need to use a different JavaScript method that lets you specify the namespace:



            document.createElementNS(namespace, element);


            The first argument is the namespace so you should use: "http://www.w3.org/2000/svg", and the second is the element, in this case "circle". So try:



            var node = document.createElementNS("http://www.w3.org/2000/svg", "circle");


            If you're more interested, check out MDN docs:



            https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course



            https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 10 at 1:46

























            answered Nov 10 at 1:35









            gdanielyan

            255




            255











            • Yea I did this and nothing changed. Is this maybe problem with my <body> ?
              – Wojciech Kubiak
              Nov 10 at 1:55










            • Or wait, it works... But why? I did it before.
              – Wojciech Kubiak
              Nov 10 at 2:00










            • Glad it works. Your index.html should have <head> and <html> tags as well. Also, you have an inline function call to myFunction() in the body tag, not sure if you're actually defining that somewhere else.
              – gdanielyan
              Nov 10 at 2:14
















            • Yea I did this and nothing changed. Is this maybe problem with my <body> ?
              – Wojciech Kubiak
              Nov 10 at 1:55










            • Or wait, it works... But why? I did it before.
              – Wojciech Kubiak
              Nov 10 at 2:00










            • Glad it works. Your index.html should have <head> and <html> tags as well. Also, you have an inline function call to myFunction() in the body tag, not sure if you're actually defining that somewhere else.
              – gdanielyan
              Nov 10 at 2:14















            Yea I did this and nothing changed. Is this maybe problem with my <body> ?
            – Wojciech Kubiak
            Nov 10 at 1:55




            Yea I did this and nothing changed. Is this maybe problem with my <body> ?
            – Wojciech Kubiak
            Nov 10 at 1:55












            Or wait, it works... But why? I did it before.
            – Wojciech Kubiak
            Nov 10 at 2:00




            Or wait, it works... But why? I did it before.
            – Wojciech Kubiak
            Nov 10 at 2:00












            Glad it works. Your index.html should have <head> and <html> tags as well. Also, you have an inline function call to myFunction() in the body tag, not sure if you're actually defining that somewhere else.
            – gdanielyan
            Nov 10 at 2:14




            Glad it works. Your index.html should have <head> and <html> tags as well. Also, you have an inline function call to myFunction() in the body tag, not sure if you're actually defining that somewhere else.
            – gdanielyan
            Nov 10 at 2:14

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53235169%2felements-visible-only-from-inspector-svg%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

            Crossroads (UK TV series)

            ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế