SimonKaluza / jsmodal

Automatically exported from code.google.com/p/jsmodal
MIT License
0 stars 0 forks source link

Ajax load callback #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have added a callback when Ajax call is finished with success so I can 
execute some script related to modal (in my case a datepicker).

I just added a setting:
settings.ajaxSuccess = parameters.ajaxSuccess || defaultSettings.ajaxSuccess;

And then in modal ajax content copy to inner html:
...
modalContent.innerHTML = ajaxResult;

if (settings.ajaxSuccess) {
    settings.ajaxSuccess();
}
...

Added the full code.
Could be a nice small feature to add?

Original issue reported on code.google.com by tfs...@gmail.com on 27 Mar 2014 at 9:32

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by tfs...@gmail.com on 27 Mar 2014 at 9:40

Attachments: