• 不同的extend 在调用构造函数时不同的写法


     /**
     * jQuery.hhNewSilder 滚动图片插件
     * User: huanhuan
     * QQ: 651471385
     * Email: th.wanghuan@gmail.com
     * 微博: huanhuan的天使
     * Date: 13-10-11
     * Time: 下午1:20
     * Dependence jquery-1.7.2.min.js
     */
     
    function silder(infor){
        //第1种调用方法
        var defaults = {
           imgBox : function(){return new Getimg();}
        }
        var option = $.extend(defaults, infor);
        function Getimg(){
            this.imgList = $('.box');
        }
        option.imgBox().imgList;
        
        
        //第2种调用方法
        var op = $.extend({
            picBox:new GetImg()
        },infor);
        function GetImg(){
            this.cir = $('.box');
        }
        op.picBox.cir;
        
        
        //调用方法
        function GetSize(){
            this.w = $('.'+option.picBox,_thisAll).width();
            this.h = $('.'+option.picBox,_thisAll).height();
            return this;
        }
        var s = GetSize;
        s.w
        
        //调用方法
        function getSiz(){
            var w = $('.'+option.picBox,_thisAll).width();
            var h = $('.'+option.picBox,_thisAll).height();
            return { w: w, h: h}
        }
        var size = getSiz();
        size.w 
            
    }
  • 相关阅读:
    XML  XmlDocument
    程序集报错
    程序打开网页
    写入文件txt
    读取文件txt
    MSM8953中Android系统添加启动脚本.rc文件
    SELinux基础知识
    嵌入式Linux设备查看USB相关信息
    Linux内核态文件读写相关函数API
    C语言中sscanf()函数相关用法
  • 原文地址:https://www.cnblogs.com/huanhuan1989/p/3363971.html
Copyright © 2020-2023  润新知