zoukankan      html  css  js  c++  java
  • $(...).live is not function

    项目中引入了一个插件,但是调用的时候就报了$(...).live is not function

    上网搜索了一下live方法在1.9中被删除了,因为平时自己用的时候就用on的方法,没用过live,所以对这个还不算熟悉。上代码

    原代码:

    $("li.select",_SELF).live("mouseover",function(){
                        $(this).find("div").show().animate({"opacity":options.setTitle.opacity },100);
                        $(this).find("b").show().delay(100).stop().animate({"height":textHeight,"opacity":options.setTitle.opacity},150);
                        return false;
                    })

    改完后的

        $("li.select",_SELF).on("mouseover",function(){
                        $(this).find("div").show().animate({"opacity":options.setTitle.opacity },100);
                        $(this).find("b").show().delay(100).stop().animate({"height":textHeight,"opacity":options.setTitle.opacity},150);
                        return false;
                    })

    相对应的1.9中被移除的方法都在这里哟 http://jquery.com/upgrade-guide/1.9/#live-removed

  • 相关阅读:
    jquery Table基础操作
    window.opener
    CSS基础
    CSS样式
    CSS框架
    常用正则表达式
    HTML字体对应word字体
    SQL获取所有数据库名、表名、储存过程以及参数列表
    SQL集合运算:差集、交集、并集
    sql数据分页
  • 原文地址:https://www.cnblogs.com/myzy/p/6042527.html
Copyright © 2011-2022 走看看