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 length
  • jj_input7 = vertical length
  • jj_input8 = blue radius
  • jj_input9 = spread
  • jj_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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -