Added this code:
$("#dialog-show-button").on('click', function(e) {
e.preventDefault();
AJS.dialog2("#demo-dialog").show();
});
with the dialog section in HTML.
It only worked once at the beginning, after page refresh started getting the following error:
Uncaught TypeError: AJS.dialog2 is not a function
Tried
AJS.toInit(function($), but didn't worked.
Hi, what about this?
require(['jquery', 'aui/dialog2'], function($, dialog2) {
$("#dialog-show-button").on('click', function(e) {
e.preventDefault();
dialog2("#demo-dialog").show();
});
});
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.