Hello everyone,
I'm implementing Simplemodal in an application of mine using this code:
$(".dialog-link").live('click', function(e) {
e.preventDefault();
$.get($(this).attr('href'),function(data) {
$.modal(data, {onOpen: open, position: ['10%','30%']});
);
});
(FYI: the onOpen callback just sets some height)
The document returned by the ajax call (contained in data) has some jquery calls to datepicker, etc. But when my dialog displays the datepicker won't work.
I know I can open the datepicker from the onShow callback, but the ideal would be to call a function contained in data because each dialog can have different jquery calls.
Is there a way to do for example
onShow: function(dialog) { dialog.data.my_function(); }
Thanks, Michael