Tuesday, December 1, 2009

Testing on Android

I got a BlackBerry device from work, but unfortunately the included (or any other) browser is not up to the strenuous demands of the Grendel. Using the AVD, I have a much better idea of real-world usage:

Close a JQuery Dialog by clicking outside of it

Thank you David Little: http://www.littled.net/new/2009/11/30/how-to-close-a-jquery-dialog-box-by-clicking-outside-of-it/

function show_dialog(title, content) {
// close dialog when clicking outside of it
$(".ui-widget-overlay").live("click", function() { $("#mydialog").dialog("close"); } );
$("#mydialog").html(content);
$('#mydialog').dialog('option', 'title', title);
$("#mydialog").dialog( {
modal : true,
autoOpen : false,
title : title,
position: 'left'
});