javascript - Div Wrapper childern setArribute offset -


i adding wrapper division , trying set offset right 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 not work! appreciate suggestions.

do this:

canvaso.style.offset = '100px;'  

or

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

i presume trying change style.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -