[Solved] Adding multiple classes with jQuery? [closed]


Why a command that sets multiple classes will be useful if you can’t set multiple classes?

I don’t understand this post, it’s not a question but as you can see you can define multiple classes.
If you don’t understand how to use it, here’s the documentation link : https://api.jquery.com/addclass/

$(document).ready(function(){
  $('#myDiv').addClass('div1 div2 div3');
});
.div1 {
  background-color: #888;
}
.div2 {
  color: #FFF;
}
.div3 {
  padding: 10px 15px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="myDiv">Test</div>

1

solved Adding multiple classes with jQuery? [closed]