Answer: addClass is an in-built jQuery method,which is used for adding class dynamically.We have to pass class name in this
addClass method.
Syntax:-
addClass(our_className);
For Example:-
<script src = "//code.jquery.com/jquery-1.10.2.js"></script>
$("p").addClass("our_className");
Now,write your own class,and replace with our_className.
Asked In: Many Interviews |
Alert Moderator