javascript - dynamic max-height with js in firefox -


i cannot alter max-height value of div in javascript. can give me hints. works in chrome, safari, , ie not in firefox. there way work in ff?

http://jsfiddle.net/4k7rk/

<div id='box'>     lot of text<br/>     lot of text<br/> </div>  #box {     max-height: 10px;     overflow: hidden; } $('box').setstyle({'max-height': '100px'}) 

according prototypejs documentation need use camelized version of style

so instead of

$('box').setstyle({'max-height': '100px'}); 

it should be

$('box').setstyle({'maxheight': '100px'}); 

this fiddle shows working in firefox 20 http://jsfiddle.net/4k7rk/6/

http://api.prototypejs.org/dom/element/prototype/setstyle/


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -