I'm trying to make the entire area of each li in a ul click to the <a>
inside each li. Wordpress 5.41 (if that makes any difference.)
<ul class="six-corners">
<li id="button_parents">
<h3><a href="/parents">Parents</a></h3>
</li>
<li id="button_schools">
<h3><a href="/schools">Schools</a></h3>
</li>
etc...
And this jQuery:
jQuery(".six-corners li").click(function(event) {
if (! jQuery(event.target).is('a')) {
var a = jQuery(this).find("a");
a.trigger('click');
}
});
What happens is that the 'a' appear to be clicked (the link flashes as though clicked), but the page doesn't actually go to the new location.
What am I doing wrong?