Dialog data different depending on jQuery version

Dialog data different depending on jQuery version

Using various versions of jQuery UI (1.9.2 - 1.10.2) and various versions of jQuery (1.8.2 - 2.0.0), I am attempting to resize any open dialogs if user resizes iframe. (based on code found here:  http://stackoverflow.com/questions/3060146/how-to-auto-center-jquery-ui-dialog-when-resizing-browser)

My code looks like this:
  1. $(".ui-dialog-content:visible").each(function () {
  2.     var dialog = $(this).data('xxxx'),

I am finding that sometimes (jQuery UI 1.9.2 - jQuery 1.8.2) I need to use the following code to get the dialog:
  1.        $(this).data('dialog')
sometimes (jQuery UI 1.10.2 - jQuery 1.9.1) I need:
  1.       $(this).data('uiDialog')
and sometimes (jQuery UI 1.10.2 - jQuery 2.0.0) I need:
  1.        $(this).data('ui-dialog')
Not sure if this is caused by jQuery or by jQuery UI, but while not part of the public API it would be great if this value wouldn't be randomly changing between releases.