Jago6060 Posted July 28, 2007 Share Posted July 28, 2007 my code is set so I can enlarge the images but they don't retain their original proportions. Anyone know how I can keep the image proportions? heres my function... <script language="JavaScript"> function imgEnlarge(obj){ obj.height += 150; obj.width += 150; } function imgShrink(obj){ obj.height -= 150; obj.width -= 150; } </script> Quote Link to comment Share on other sites More sharing options...
mainewoods Posted July 28, 2007 Share Posted July 28, 2007 try just setting the height and set the width to blank(it works in html): function imgEnlarge(obj){ obj.width = ''; obj.height += 150; } function imgShrink(obj){ obj.width = ''; obj.height -= 150; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.