jQuery addClass example

Change class name on click in jQuery

by wisegorilla

HTML

<body marginwidth="0" marginheight="0"><div class="modalContent" id="SignupForm_0" widgetid="SignupForm_0">
    <div class="flash-block" data-dojo-attach-point="formResponseMessages"></div>
    <div class="modalContent__content" data-dojo-attach-point="formContentContainer">
        
        <!-- Title & Description - Holds HTML from CK editor -->
        <div class="content__titleDescription">
            <div data-dojo-attach-point="descriptionContainer"><div style="text-align: center;"><span style="font-family:tahoma,verdana,segoe,sans-serif"><span style="color:#6699cc"><span style="font-size:18px"><strong>Werde Teil der bonmedico Community &amp; spare<span style="font-size:32px"><strong> </strong></span>15 % bei Deinem&nbsp;ersten Einkauf.&nbsp;</strong></span></span></span></div>
</div>
            <div class="content__fixedBadge" data-dojo-attach-point="fixedBadge"></div>
        </div>

        <!-- Form Fields -->
		<form action="//mc.us14.list-manage.com/subscribe/form-post?u=db40c343b16b0af0b777d7db4&amp;id=2631affdd7&amp;popup=true" accept-charset="UTF-8" method="post" enctype="multipart/form-data" data-dojo-attach-point="formNode" novalidate="">
			<div class="content__formFields" data-dojo-attach-point="formFieldsContainer"><div class="field-wrapper" id="uniqName_3_0" widgetid="uniqName_3_0">
	<label for="mc-EMAIL">Email-Adresse</label>
	<input type="email" name="EMAIL" value="" id="mc-EMAIL">
<div class="invalid-error"></div></div><div class="field-wrapper radio-group" id="uniqName_3_1" widgetid="uniqName_3_1">
	<label for="mc-group[7316]">Möchtest Du unseren Newsletter erhalten?</label>
	<ul class="radioCheckboxContainer" data-dojo-attach-point="choicesContainer"><li><input id="mc-group[7316]-7316-0" type="checkbox" value="1" name="group[7316][1]"><label for="mc-group[7316]-7316-0">Ja. Ich habe die Datenschutzerklärung gelesen.</label></li></ul>
<div class="invalid-error"></div></div><div class="field-wrapper" id="uniqName_3_2"...

JavaScript

$( "div.content__button .button" ).click(function( event ) {
	alert('test');
});