I’ve followed the recommendation here for triggering a modal from some text, Properly remove anchor tag when closing modal content area. but I can’t get it working? I’m sure I’m missing something obvious, but can’t see what, and there are no errors visible in my brosers development tools. Can you help please? Thank you.
I’ve set the modal Toggle Hash to ‘condition-modal’.
Here are the elements I’m using.
(function($) {
$(’.open-modal-text’).on(‘click touchend’, function(e) {
e.preventDefault();
$(’[data-x-toggle-hash=“condition-modal”]’).click();
});
})(jQuery);