I am trying to use javascript to have a link created on page load and then when that link is clicked to insert content into a div.
This is where I'm at so far...
<div class="inside">
</div>
<div class="content">
<input type="textarea">
</div>
<script>
jQuery( document ).ready(function() {
jQuery( ".inside" ).append( '<p><a href="">Insert Content</a></p>' );
});
</script>
Fiddle: https://jsfiddle.net/03afj8fd/
Now I need to be able to insert some preset content into the input box when the generated link is clicked. Anyone point me in the right direction of an example?