jquery/jquery-mobile — Issue #3631: Error Calling Close Method Of Dialog "cannot call methods on dialog prior to initialization"
Author: jasonparallel
Created: 2012-02-24 00:11:05+00:00
State: open

Using $('.ui-dialog').dialog('close') to close a dialog (as stated in http://jquerymobile.com/test/docs/pages/page-dialogs.html) throws an error with the latest version of jquery mobile. uncaught exception: cannot call methods on dialog prior to initialization; attempted to call method 'close' Tested in FIrefox 10.0.2 Win Vista
Example: http://jsfiddle.net/jasonparallel/VDy6g/
Running the same code with an older version of jquer mobile closes the dialog without error
http://jsfiddle.net/jasonparallel/T9KhD/

I'm not sure if it is a bug in jqm or out of date documentation