Solved
foundation-contentloaded and dialog-ready event listers fired before touch dialog loads all content - AEM 6.4
I am doing some custom field level validation in touch UI. I can see the dialog-ready and
foundation-contentloaded event fires before the dialog content is fully loaded which gives me empty value.
I would want to know, Is there any event listener that i can use for triggering a call after my dialog is fully loaded with all widgets and its values.
(function(document, $) {
"use strict";
$(document).on("change", ".nutri-info-content", function(e) {
var val = $(".nutri-info-dropdown").val(); // This works
if (val == "abc") {
$('.nutri-info-field').parent().hide();
}
});
$(document).on("foundation-contentloaded", function(e) {
var val = $(".nutri-info-dropdown").val(); // Value is not coming. facing same problem even with dialog-ready event.
if (val == "abc") {
$('.nutri-info-field').parent().hide();
}
});
})(document, Granite.$);