javascript - How to change width of a div by using jQuery in terms of percentage? for ex- to double the div's size upon mouse click -


i've come across methods change div size px, em , points. couldn't find way same percentage.

in jquery possible set dimensions div based following

$("#whatever").css("width/height", "x%");

ref http://api.jquery.com/css/#css-propertyname-value

or can use dom document.getelementbyid('whatever').style.width = 'x%';


Comments

Popular posts from this blog

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

Why does PHP consider 0 to be equal to a string? -

formula - R: how to pass in a reference to the variable in glm or lm? -