Javascript – How to replace innerHTML of a div using jQuery

innerhtmljavascriptjquery

How could I achieve the following:

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

Using jQuery where regTitle is my div id?

Best Answer

$("#regTitle").html("Hello World");