finding object by class and fade another object

This question already has an answer here:

  • How can I select an element with multiple classes in jQuery? 10 answers

  • $(".icon.informationIcon").bind("mouseleave", function () {
        redNotesDiv.fadeOut("slow", "linear")
    });
    

    在选择器中,类不应该有空格,每个类都应该有(点)。运算符


    当您想要选择具有多个类的元素时,应使用以下格式:

    $(".class1.class2.class3")
    
    # your code should be
    $(".icon.informationIcon").bind("mouseleave", function () {
        redNotesDiv.fadeOut("slow", "linear")
    });
    
    链接地址: http://www.djcxy.com/p/83108.html

    上一篇: 用jQuery选择多个类

    下一篇: 按类别查找对象并淡入另一个对象