SyntaxFix
Write A Post
Hire A Developer
Questions
$('#field-function_purpose') will get you the element with ID field-function_purpose, which is your div element. text() returns you the content of the div.
$('#field-function_purpose')
field-function_purpose
text()
var x = $('#field-function_purpose').text();