Question

I am adding a wrapper to a division and trying to set offset right as follow:

                var wrapper_div = document.getElementById('container1');
                var kinetic_div = wrapper_div.children[0];
                canvaso = kinetic_div.children[0];
                canvaso.setAttribute('id', "panel1");
                canvaso.setAttribute('offset', '100px');

Unfortunately it does not work! Would appreciate your suggestions.

Was it helpful?

Solution

Do this:

canvaso.style.offset = '100px;' 

or

canvaso.setAttribute('style','offset:100px;');

I presume that you are trying to change the style.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top