this is a yinying
1q2w3e4r
-----------------js-------------------------
$.showInfo = function(){
console.log("这是全局showInfo()")
};
$.extend({
functionOne:function(){console.log("这是functionOne")},
functionTwo:function(){console.log("这是functionTwo")}
})
$.mnt = {
functionOne:function(){console.log("这是mnt.functionOne")},
functionTwo:function(){console.log("这是mnt.functionTwo")}
}
$.fn.changeBgColor = function(color){
this.css('background-color',color);
return this;
}
$.fn.shadow = function(options){
var defaults = {
slices:10,
opacity:0.1,
zIndex:-1,
text:"okkkkkk"
}
var $opts = $.extend(defaults,options);
return this.each(function(){
var $org = $(this);
alert($opts.text)
for(var i = 0;i < $opts.slices;i ++){
$org.clone().css({
position:"absolute",
left:$org.offset().left + 1,
top:$org.offset().top + 1,
margin:0,
zIndex:$opts.zIndex,
opacity:$opts.opacity
}).appendTo("body");
}
});
}