jQuery addClass example

Change class name on click in jQuery

HTML

<div id="banner-message">
  <p>Hello World</p>
  <button id='button1' onclick='doSomething()'>Do Something</button>
</div>

JavaScript

doSomething = function()  {
		alert(this);
}




var doSomethingElse = function() {
    alert(this);
}