.addEventListener & .ready

For the two statements below, how are they different? I have a native app with many forms and which uses jqWidgets extensively. Which of these statements should I be using, and when should I be using them?

$(document).ready(function () {…

document.addEventListener(“deviceready”, function(){…

My understanding is that ready is fired when jQuery (not jQuery Mobile) is complete.

deviceready (or onDeviceReady) is fired once PhoneGap is done loading.