javascript - dynamically update height of browser window -


i have page:- default.aspx.

i can change height via css:-

.main {     padding: 0px 12px;     margin: 12px 8px 8px 8px;     min-height: 420px;     width: 919px;     height: 850px; } 

just increase height or decrease in appropriate parameter.

but trying implement javascript functionality, on click of button function initiated (onclienclick). function, added elements added on page, hence want page size increase well. , again next click of same button, elements disappear, want page height decrease. m thinking of code similar following (but syntax not correct). can 1 help?

$('main').css(‘height’) = 1186px; ???? 

since you're using jquery:

$('.main').height(1186); 

reference: http://api.jquery.com/height/#height2


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -