why doesn\'t this display ibm.com into a 400x500px modal? The section appears to be correct, but it doesn\'t cause the popup modal to appear.
EDIT: This answer might be outdated if you're using a recent version of jQueryUI.
For an anchor to trigger the dialog -
Here's the script -
$('a.example').click(function(){ //bind handlers
var url = $(this).attr('href');
showDialog(url);
return false;
});
$("#targetDiv").dialog({ //create dialog, but keep it closed
autoOpen: false,
height: 300,
width: 350,
modal: true
});
function showDialog(url){ //load content and open dialog
$("#targetDiv").load(url);
$("#targetDiv").dialog("open");
}