Jquery 'click' not firing when icon is on button

前端 未结 3 1290
Happy的楠姐
Happy的楠姐 2021-01-19 14:17

I use Bootstrap and jQuery. I have three buttons, each with an icon in it. When I bind an click-event to a button, it works when I cli

3条回答
  •  难免孤独
    2021-01-19 14:42

    Update your css with the following. I'm assuming you don't need mouse events on your icon.

    .icon-eye-open {
    
        pointer-events:none;
    }
    

    MDN Information regarding pointer-events

提交回复
热议问题