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

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -