Does anyone know how to resize images proportionally using JavaScript?
I have tried to modify the DOM by adding attributes height and width
height
width
Use JQuery
var scale=0.5; minWidth=50; minHeight=100; if($("#id img").width()*scale>minWidth && $("#id img").height()*scale >minHeight) { $("#id img").width($("#id img").width()*scale); $("#id img").height($("#id img").height()*scale); }