jquery - Change width of a class using Javascript and save State -


i working on website has static left sidebar 250px wide have come across issue whereby when user on computer screen resolution screen less 1200px sidebar takes far space on screen.

how go setting there button collapse sidebar 100px , save state whilst using website? , once has been collapsed there button user expand sidebar original state?

also, when user either clicks on collapse or expand button, don't want whole page refresh there lot of forms on site , if page refreshes user have re-enter details (if click on button mid-form).

any appreciated!

thanks!

best thing set css media queries sidebar automatically resized on smaller screens without user interaction. here example(obviously you'll have replace selectors ones apply page):

@media(min-width:992px){     .sidebar {width:150px} }  @media(min-width:1200px){     .sidebar {width:250px} } 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -