;(function($){
$.fn.contentTabs = function(o){
// default options
var options = $.extend({
activeClass:'active',
addToParent:true,
autoHeight:false,
autoRotate:false,
animSpeed:400,
switchTime:3000,
effect: 'none', // "fade", "slide"
tabLinks:'a',
event:'click'
},o);
return this.each(function(){
var tabset = $(this);
var tabLinks = tabset.find(options.tabLinks);
var tabLinksParents = tabLinks.parent();
var prevActiveLink = tabLinks.eq(0), currentTab, animating;
var tabHolder;
.......省略.....
-------------------
上面代码是一个JQuery插件前面一部分的代码
看倒数第二句
var prevActiveLink = tabLinks.eq(0), currentTab, animating;
...声明一个变量,后面给了3个值?用逗号隔开....
没学过这种写法...
求指教....
千万里不及你
一只甜甜圈
相关分类