What I am trying to do is add a commenting feature to my web application. Ideally here is the setup:
<div class="panel-footer">
<a>Comment 1</a>
</div>
<div class="panel-footer">
<a>Comment 2</a>
</div>
<div class="panel-footer">
<a class="comment-add"><span class="glyphicon glyphicon-plus"></span></a>
</div>
$(".comment-add").click(function() {
var c = "<span class='glyphicon glyphicon-plus'></span>"
var b = "<a class='comment-add'>" + c + "</a>"
var a = "<div class='panel-footer'>" + b + "</div>"
$(this).parent().after(a);
});
The plus symbol will be a glyphicon that when clicked turns into an editable comment. I already have that working so for now just ignore that. The issue I'm having is that when the (+) symbol is clicked, I would like it to generate a new (+) after it that can also be click to generate another (+).
In the fiddle, you can see that the first (+) can be repetitively click to generate more (+)'s but those generated cannot be clicked.
Here is the fiddle, I feel like I'm close I am just having trouble figuring it out.