1$(document).ready(function(){
2 $("button").click(function(){
3 $(".p").addClass("intro");
4 });
5});
1var someElement= document.getElementById("myElement");
2 someElement.className += " newclass";//add "newclass" to element (space in front is important)