I have one component
In this whenever enable image variation is selected then in Multifield I want Image and caption should be appearing else no image and caption should be there,
I cant achieve this.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Ronnie09
function showHide() { let defaultt = $(".default").prop("selected"); let red = $(".red").prop("selected"); let green = $(".green").prop("selected"); if (defaultt) { $(".text").removeAttribute("hidden"); $(".checkbox").removeAttribute("hidden"); } else { $(".text").setAttribute("hidden", true); $(".checkbox").setAttribute("hidden", true); } if (red || green) { $(".newdropdown").removeAttribute("hidden"); } else { $(".newdropdown").setAttribute("hidden", true); } }
Hi @Ronnie09
function showHide() { let defaultt = $(".default").prop("selected"); let red = $(".red").prop("selected"); let green = $(".green").prop("selected"); if (defaultt) { $(".text").removeAttribute("hidden"); $(".checkbox").removeAttribute("hidden"); } else { $(".text").setAttribute("hidden", true); $(".checkbox").setAttribute("hidden", true); } if (red || green) { $(".newdropdown").removeAttribute("hidden"); } else { $(".newdropdown").setAttribute("hidden", true); } }
Views
Likes
Replies