jQuery中插件的格式

    //定义一个jQuery插件格式  
    jQuery.fn.extend(  
        {  
            函数名1:function () {  
                函数体  
            },  
            函数名2:function () {  
                函数体  
            }  
        }  
    );  
    //调用一个jQuery插件格式  
    jQuery对象.函数名1();  

猜你喜欢

转载自blog.csdn.net/cccdf_jjj/article/details/79214434