Can we override coral-selectlist-item selected attribute of dialog box in javascript? Can not remove selected atribute from coral select options list by javascript in aem 6.5
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Nusrat_Jahan ,
You can try to create your custom JS file which will overwrite the desired attribute.
Something like below, this is just a vague logic but you may need to modify it based on your requirement
(function (document, $) {
"use strict";
$(document).on("foundation-contentloaded", function () {
setValue(dropDownSelector);
});
function setValue(dropDownSelector) {
$(dropDownSelector).each(function() {
$(dropDownSelector + " coral-selectlist-item[value="+ hrefLang +"]").prop('selected', false);
});
}
})(document, Granite.$);
-Tarun
@Nusrat_Jahan Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies