jQuery addClass example

Change class name on click in jQuery

by joshmoto

HTML

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js"></script>
<section class="section1">
  <div class="container info">
    <div class="row">
      <div class="col-lg-12 " align="center">
        Make Future Visible <span>&trade;</span>
      </div>
    </div>
  </div>
  <div class="container">
    <div class="row">
      <div class="col-lg-12 info2" align="center">
        Real-time predictive analytics for refining equipment eliminate accidents<br> and fires, increases refinery uptime, decreases downtime and drastically<br> reduces maintenance costs.
      </div>
    </div>
  </div>
</section>

CSS

.section1 {
  height: 600px;
  background: url("//upload.wikimedia.org/wikipedia/commons/e/e5/Golden_rectangle.png") no-repeat top center;
  background-size: 100% auto;
}

/* Extra small devices (portrait phones, less than 300px) */
@media (max-width: 300px) {
 
  .section1 {
    background-size: cover;
    background-position: center center;
  }
  
}