.text( [ text_String ] )
Gets the innerText / TextContent of an element. Sets the innerText / TextContent of an element if Text string is provided and returns the new innerText.
Parameters
NameTypeDefaultPossibleDescription
Text_StringStringOptionalstringSets this text value as text node of the element
Returns
TypeDescription
StringReturns innerText of the element
Example 1
Gets innerText of #cont div.
JS HTML
		$.domLoaded(function() {
			
			$.get("#get").on("click", function() {
			
				// get the innerText of #cont
				var co = $.get("#cont").text();
				alert(co);
				
			});
			
		});						
						
<body>

<div id="cont"> 
	Welcome To NedilJS
</div>

<input type="button" id="get" value="Get innerText"" />

</body>
Result
Example 2
Sets innerText of #cont div.
JS HTML
		$.domLoaded(function() {
			
			$.get("#get").on("click", function() {
			
				// set innerText of #cont
				$.get("#cont").text("Welcome, Please See the demos");
				
			});
			
		});						
						
<body>

<div id="cont"> 

</div>

<input type="button" id="get" value="Set innerText" />

</body>
Result