how to add css on click and remove it when they click close button [closed]

Tags: javascript,jquery,html,css

Problem :

How to use the below CSS on click using javascript or jquery. Does anyone know how to do it?

#outer-wrapper {width:100%;max-width:1000px;margin:0 auto;padding:0;text-align:left;float:none;background-position:center!important;}
#post-wrapper {width:100%;max-width:1000px;margin:0 auto;text-align:left;float:none;background-position:center!important;}
.banner,#footer-wrapper,#comments,#sidebar-wrapper,#header-wrapper,#menu-wrapper {display:none;margin-top:0;margin:0;}
.post-inner {padding:0 0 0 0;margin:20px auto;}

My aim is when the user clicks the HTML element the CSS should be applied to that and when he clicks close button the CSS should be removed from the element.

Solution :


   <button id="start">Start</button> 
     <button id="close">Close</button> 


$('#start').click(function () {


$('#close').click(function () {



// css style here

    CSS Howto..

    How do I select every other div class element using just CSS (no js)

    How to disable and enable css rule

    How to make menu bar with nested submenu css

    Show text underneath image while hovering without disrupting other elements

    How to create a cross with pure css [duplicate]

    how to arrange the sequence of js and css files in webpage?

    How to avoid ui-block div (jquery mobile) to overlap in internet explorer?

    How to add a custom font to Rails app?

    How to put CSS content in select box and rotate it?

    how to set individual scroll for content and left menu

    How to assign color obtained by CSS gradient generator

    HTML+CSS: How to add arrow to horizontal menu items?

    How can I make a designer's static web page run in rails 4

    How to add labels for multiple textboxes inside 1 li element

    how to center a box using blueprint css framework

    How to Make CSS3 Columns Display Properly [closed]

    creating a slide show for home page in my web site [closed]

    How to Auto set the height of a div using the height of another div

    How do I control the wrapping of these
  • items?
  • Responsive CSS background image - how to make content follow

    jquery css how to retain position if you remove margin

    How to use pure CSS to control other elements under same parent?

    How to create a shadow in HTML, CSS & JS that doesn't accept clicks, but let it hit behind that layer?

    html, css - cursor - how to change default image for pointer

    How to dynamically set and modify CSS in JavaScript?

    How to scroll a page or a element using css

    How can I style this span for a quote without causing this layout problem?

    css animation how to get the ball to bounce

    How to locate the element within CSS using javascript

    CSS: How to create special shape