Reopen modal OR open two modals in the same page?
-
Hi Yannick,
I’ve looked through the support forum and saw on several places that neither of these two options are possible with your plugin, However, I want to ask again. How can I make the modal open twice on the same page? I need one and the same modal open after, let’s say, 30 seconds, and then again after 2 minutes.
I’m asking again since I already use your plugin for almost all of my projects, and it would be tedious to change the plugin for just this one feature.
I’ve tried hard-coding it into your modal-dialog.php lines 721-726:
$output .= "\t\tsetTimeout(\n"; $output .= "\t\t\tfunction(){\n"; $output .= "\t\t\t\tmodal_dialog_open();\n"; $output .= "\t\t\t}, 30000);\n"; $output .= "\t\tsetTimeout(\n"; $output .= "\t\t\tfunction(){\n"; $output .= "\t\t\t\tmodal_dialog_open();\n"; $output .= "\t\t\t}, 120000);\n"; $output .= "\t};\n";
and the modal does re-open, but loses its content.
I understand you say that Modal Dialog is not meant to be used this way, but I would really appreciate any guideline from your side. Do you think this could be done with a simple closure callback, or by modifying any JavaScript etc?
Thanks in advance.
- The topic ‘Reopen modal OR open two modals in the same page?’ is closed to new replies.