So i’m not sure why this isn’t working as I’m following the docs - https://theme.co/docs/toggleable#programmatically
Here you can see if you set a modal toggle like this the toggle is triggered so it shows the cross but doesn’t activate the modal. I’ve also tried not setting the variable and use the one that cornerstone gives. e.g. “e2-cs146” but no luck. As predicted the console logs gives a false followed by a true;
Can we check if this is a bug? Thanks
jQuery(document).ready(function($) {
setTimeout(function() {
console.log(window.xToggleGetState("my-toggle-id"));
window.xToggleUpdate("my-toggle-id", true);
console.log(window.xToggleGetState("my-toggle-id"));
}, 1500);
});
Modal variable setup like this