zoukankan      html  css  js  c++  java
  • 未渲染的dom结构,绑定事件,jquery

    使用事件委托

    $(document).on('click','selector',function(){  
            ...  
        }); 

    示例

       $(document).on("click", ".Inverse", function () {
            $(this).toggleClass("current");
        
        })

    将事件冒泡到document上,当检测到事件的target时,触发事件

  • 相关阅读:
    POJ
    HDU
    POJ
    HDU
    HDU
    HDU
    POJ
    ZOJ
    ZOJ
    Kattis
  • 原文地址:https://www.cnblogs.com/liris/p/6624665.html
Copyright © 2011-2022 走看看