In the example below what’s the simplest addContent function that will put some content into the child div?
<div>
<a href="javascript:addContent();">My Link</a>
<div/>
</div>
Clicking the link should result in:
<div>
<a href="javascript:addContent();">My Link</a>
<div>Added Content</div>
</div>
Take a look at
next:Instead of using an inline function, give your ‘add content’ links a class, and bind to anchors with that class as in the above example:
Try a demo here: http://jsfiddle.net/wGz8s/1/