jQuery addClass example

Change class name on click in jQuery

by DefuZe

HTML

<div class='row'>
  <div id='d1'>
    hello dsfgds fds   hello dsfgds fds  hello dsfgds fds  hello dsfgds fds  hello dsfgds fds  hello dsfgds fds  hello dsfgds fds  hello dsfgds fds  hello dsfgds fds
  </div>
  <div id='d2'>
    hello 2 ewr ewr wer
  </div>
</div>

CSS

.row {
 display: flex;
    display: -webkit-flex;
    display: -moz-flex;
     flex-direction: row;
    -webkit-flex-direction: row;
    -moz-flex-direction: row; 
    width: 100%;
    flex-flow: row wrap;
    
}
#d1 {
  background: red;
  flex: 70%
}

#d2 {
  background:blue;
  flex: 30%;
}

@media (max-width: 800px) and (min-width: 500px) {
  .row div {
    width: calc(50% - 3 * 2px);
  }
}