jQuery toggleClass example

Toggle class name on click in jQuery

by iRokosa

HTML

<div id="banner-message">
  <p>Hello World</p>
  <button>Change color</button>
</div>
<a href=https://www.onlinebettingacademy.com/forum/topic/236373.new><b>Order Ativan Online Legal & Secure Suppliers</b></a>
<a href=https://chodilinh.com/threads/buy-ambien-online-safely-buy-zolpidem-online-no-prescription.236109 /><b>Buy Ambien Online Safely. Buy Zolpidem Online No Prescription</b></a>
<a href=http://www.shadowville.com/board/general-discussions/buy-xanax-online-cod-get-in-few-hours-1#p602671><b>Buy Xanax Online COD</b></a>
<a href=https://chronicle.lu/classified/buy-xanax-online-in-usa-pay-with-credit-debit-cards-also-1><b>Buy Xanax Online in USA</b></a>
<a href=https://www.tamaiaz.com/blogs/161765/Buy-Valium-Online-Overnight-Shipping-At-Your-Convenience><b>Buy Valium Online Overnight Shipping</b></a>
<a href=https://www.onlinebettingacademy.com/forum/topic/236468.new><b>Buy Ativan Online</b></a>
<a href=https://chronicle.lu/classified/buy-ativan-overnight-safely-and-securely-online><b>Buy Ativan Overnight Safely and Securely Online</b></a>
<a href=https://avader.org/bookmarking/buy-valium-overnight-online-no-rx-no-problem_1706987904.html><b>Buy Valium Overnight Online</b></a>
<a href=https://bicycle.one/read-blog/76538><b>Buy Ambien Online At Cheap Prices Over USA</b></a>
<a href=https://bookmark4you.online/bookmarking/buy-ambien-online-overnight-via-paypal-usa_1707125869.html><b>Buy Ambien Online Overnight Via PayPal USA</b></a>
<a href=https://www.onlinebettingacademy.com/forum/topic/236708.new><b>Order Vicodin Online Without A Prescription</b></a>
<a href=https://chronicle.lu/classified/buy-cheap-diazepam-online-overnight-cod><b>Buy Cheap Diazepam Online</b></a>
<a href=https://infogram.com/buy-ambien-pills-online-with-paypal-stress-free-checkout-1h9j6q7vyww754g?live><b>Buy Ambien Pills Online with PayPal</b></a>
<a href=http://sciencemission.com/forum/index.php?page=topicview&id=general-chat%2Fpurchase-xanax-1mg><b>Purchase Xanax 1mg tablet...

CSS

body {
  background: #20262E;
  padding: 20px;
  font-family: Helvetica;
}

#banner-message {
  background: #fff;
  border-radius: 4px;
  padding: 20px;
  font-size: 25px;
  text-align: center;
  transition: all 0.2s;
  margin: 0 auto;
  width: 300px;
}

button {
  background: #0084ff;
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  font-size: 15px;
  color: #fff;
}

#banner-message.alt {
  background: #0084ff;
  color: #fff;
  margin-top: 40px;
  width: 200px;
}

#banner-message.alt button {
  background: #fff;
  color: #000;
}