css3 - Javascript Box Shadow -
i have box previews box shadow. user types in inputs lenghts, blur, spread , colour (hex). far have output of style doesn't work.
document.getelementbyid('jj_preview3').style["boxshadow"] = jj_input6 + 'px' + jj_input7 + 'px' + jj_input8 + 'px' + jj_input9 + '#' + jj_input10; jj_input6= horizontal lengthjj_input7= vertical lengthjj_input8= blue radiusjj_input9= spreadjj_input10= shadow colour
what changes have make the javascript code snippet above make work?
it should work if put in spaces. you're missing 'px' in last string literal.
document.getelementbyid('jj_preview3').style['boxshadow'] = jj_input6 + 'px ' + jj_input7 + 'px ' + jj_input8 + 'px ' + jj_input9 + 'px #' + jj_input10;
Comments
Post a Comment