KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Have a strange situation happening. I have a <h3> with text in it. When I extract this text with .text() and then put this into a <textarea> the text appears twice. Here is jsFiddle. HTML <h3 class="profileRightAboutMeText">Heya, this is all the text.</h3> <textarea class="profileRightAboutMeTextarea"></textarea> JQUERY $(document).on('click','h6.editMyProfileSection', function() { var originalText = $('h3.profileRightAboutMeText').text(); $('h3.profileRightAboutMeText').fadeOut('fast', function() { $('textarea.profileRightAboutMeTextarea').text(originalText).fadeIn('fast'); }); alert(originalText); }); Both the alert and <textarea> show the text double as follows: Heya, this is all the text.Heya, this is all the text.
Tags (comma-separated)
Save Edits
Cancel