http://demos.jquerymobile.com/1.3.2/faq/dom-ready-not-working.html
Do not use $(document).ready() etc with jQuery Mobile.
As the error states, you tried to call button methods before the buttons were initialized.
Use an appropriate page or pagecontainer event callback, or delegate.