0
/*This is my jquery I am working with now*/
$(document).ready(function() {
$('.edit').click(function() {
var content = $('.paste').html();
$('#area').html(content);
});
});
<!--This is my html code am using.. I want when I click Edit 1 the content of paragraph one is copied into my textarea and when I click Edit 2 link the paragraph is copied into textarea. The code now is working such that when I click Edit 2 the content of Edit 1 is copied in both cases...-->
<div class="article">
<p class="paste">Paragraph one </p>
<a href="#" class="edit">Edit 1</a>
</div>
<div class="article">
<p class="paste">Paragraph two </p>
<a href="#" class="edit">Edit 2</a>
</div>
<textarea rows="5" class="form-control" placeholder="Enter text..." id="area"></textarea>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>