I have a div that lets the user add additional form inputs dynamically. I’d like to be able to change this div’s height to auto once it reaches a certain height. Here is the jQuery code I have, though it doesn’t seem to be working at the moment.
$(document).ready(function(){
if($('#upload3').height() > 400){ $('#upload3').css('width','auto'); } });
This will only run ONCE when the document is ready. You need to put it inside a
resize()event handler: