JQuery UI Dialog query dialog DOM

Posted by Travis on Stack Overflow See other posts from Stack Overflow or by Travis
Published on 2010-05-13T19:18:18Z Indexed on 2010/05/13 19:34 UTC
Read the original article Hit count: 367

Filed under:
|
|

The following simply loads a jquery-ui dialog from an external html file.

$('#showdialog').click(function(e) {
    var div = $('<div>loading...</div>');
    div.dialog({
        modal: true,
        open: function() { div.load('anotherpage.html'); }
    });
    e.preventDefault();
});

After the DOM loads from the external html file, I'd like to interrogate it with JQuery. For example, supposing anothorpage.html had a bunch of anchors on it, I'd like to wire up click handlers for them when it loads into the dialog.

Any ideas?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui