1.

Solve : Positioning JS with CSS??

Answer»

Hello

Not sure if anyone can help me with this. I know nothing about JavaScript but I have the permission of the author of it to USE on a Web site. It is this:

Code: [Select] <script>
(FUNCTION () {
var n, id, progress;


progress = new CircularProgress({

radius: 20

});


n = 0;
document.getElementById('myPosition').appendChild(progress.el);

id = setInterval(function () {

if (n == 100) CLEARINTERVAL(id);

progress.update(n++);
}, 100);
})();

(function () {
var n, id, progress;

progress = new CircularProgress({

radius: 40,
lineWidth: 2,
strokeStyle: '#FFAED7',
initial: {
lineWidth: 4,
strokeStyle: '#ffffff'
}

});

document.getElementById('myPosition').appendChild(progress.el);

n = 0;

id = setInterval(function () {

if (n == 100) clearInterval(id);

progress.update(n++);
}, 70);

})();

(function () {
var n, id, progress;

progress = new CircularProgress({

radius: 70,
strokeStyle: '#FFAED7',
lineCap: 'square',
lineJoin: 'round',
lineWidth: 5,
shadowBlur: 0,
shadowColor: '#ffffff',
text: {
font: 'bold 15px arial',
shadowBlur: 0
},

initial: {
strokeStyle: '#ffffff',
lineCap: 'square',
lineJoin: 'round',
lineWidth: 5,
shadowBlur: 10,
shadowColor: '#FFB3D8k'
}

});

document.getElementById('myPosition').appendChild(progress.el);

n = 0;

id = setInterval(function () {

if (n == 100) clearInterval(id);

progress.update(n++);
}, 30);

})();

</script>
I have changed the original

document.body.appendChild(progress.el);

to what I have it so that I can position it (a diagram of 3 circles with text in them) in CSS to:

document.getElementById('myPosition').appendChild(progress.el);

but now it's not loading at all!

Thanks for any ideas.






Discussion

No Comment Found