How to replace innerHTML of a div using jQuery?

tonyf picture tonyf · Aug 21, 2009 · Viewed 1.6M times · Source

How could I achieve the following:

document.all.regTitle.innerHTML = 'Hello World';

Using jQuery where regTitle is my div id?

Answer

Zed picture Zed · Aug 21, 2009
$("#regTitle").html("Hello World");