span inside button, is not clickable in Firefox

前端 未结 3 1139
春和景丽
春和景丽 2020-12-02 00:12

My CODE


HTML:

3条回答
  •  渐次进展
    2020-12-02 00:42

    If you're here, maybe this solution will work for you, even though it's not really related directly to the question.

    If you've applied a

    • $("button").click() listener, and
    • your button contains a or any other , and
    • your .click callback function refers to $(this) (or even this)

    Then, if you click on the button, this will likely be the top-most tag you CLICKED ON.

    This will often, such as in my case, misattribute the caller, causing script errors.

    Hope it helps someone out there!

提交回复
热议问题