I am using an .append
every time I click a button.
$( ".kop_filters" ).append( "<p class='gekozen_datum'>Gekozen datum: </p>" );
If I click the button 4 times this is appending in my page like:
Gekozen datum:
Gekozen datum:
Gekozen datum:
Gekozen datum:
I want it to appear once and every time I click it removes and append again so for example after a couple of times clicking on it I have printed it once. It is because I want to load a variable in it which change every time on click.
EDIT: Found the solution here: Ajax replace instead of append