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

How to check data type in C++? -

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

sql server - SQL Query returns one result, does not return 0 or NULL result -