Set text of Div tag

Posted by Virendradugar under jQuery category on | Views : 5757
This code will set the innertext of all the div element using JQuery. You need to download the Jquery file from .

<script type="text/javascript" src="Script/jquery-1.3.2.js">  
<script type="text/javascript">
$("div").text("Virendra Dugar.");

Comments or Responses

Posted by: Raja on: 1/27/2010 Level:Starter | Status: [Member]
Thanks for sharing this Virendra.

You didn't mention that this will work in jQuery only and jQuery should be downloaded from or better to use jQuery file hosted by Microsft or google.

To use google hosted jQuery, please visit

Posted by: Virendradugar on: 1/27/2010 Level:Silver | Status: [Member] [MVP]
Hi Raja,

Thanks for your response. I didn't write it intentionally as this question falls in Jquery category.

Anyways, I have update it.

Virendra Dugar

Login to post response