I'm trying to click add and the content of add will appear for the first time.
After it's added, I want to click add and it will only toggle "added", instead of adding "added" on each click
Jquery:
$(function(){
var NewContent='<div class="added">Added</div>'
$(".add").click(function(){
$("#spin").after(NewContent);
});
});
HTML:
<span class="add">add</span>
<span id="spin"></span>
Here's a Fiddle: http://jsfiddle.net/Abgec/