1. 用jquery idTabs,如何才能做到手动跳转,下面tab3里做个按钮可跳转到tab1里?
点击时执行这个方法:
$("#tabsbox ul").idTabs("tabs1");
2. 一个jquery的tab选项卡,例如选择了第二个选项卡。那么到其他页面后在后退,怎么在到那个默认的选项卡
默认下就是你要实现的效果啊,不需要任何特殊处理你的后退是不是一个页面跳转?好吧,刚发现浏览器下返回会默认为初始状态url里带#abc这种有很多jquery插件实现的一个jquery的tab选项卡,例如选择了第二个选项卡。那么到其他页面后在后退,怎么在到那个默认的选项卡
3. 一个jquery的tab选项卡,例如选择了第二个选项卡。那么到其他页面后在后退,怎么在到那个默认的选项卡
默认下就是你要实现的效果啊,不需要任何特殊处理
你的后退是不是一个页面跳转?
好吧,刚发现微信浏览器下返回会默认为初始状态
url里带#abc这种有很多jquery插件实现的
4. 怎么样让jquery—ui的tabs选项卡的某一个被默认选中
$("#tabs").tabs( "select" , index );
5. 如何让easyui中的tabs初始化时默认不是选中第一个选项卡而是选中我指定的选项卡??
手动用代码控制,否则easyui不能读懂你的心,不知道你想要默认选中那个
使用内置的select方法,参数可以使ID,也可以使NAME
6. js如何实现一周tab效果, 默认显示当天星期几的内容,tab可切换。
给你一个插件吧~不过要配合CSS哦~其实也没什么~就是有几个选项卡就写几个内容出来然后其他的隐藏,只让当前的显示~给你个JS插件,不懂的再问吧~不过要这个插件是JQ的~需要JQ库支持哈~最好的1.8.3的
7. jquery代码谁有空帮我改一下下的,Tab标签问题的。它原来内容是以li隔开的,我想改成是用Ul的
这个应该可以改吧 你改了不行了吗?发我看看 追问: 我是初学者来的,所以改起来可能比较困难点,方便加下我扣扣吗?三九 五五 二一三九三 追问: 这是HTML http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> http://www.w3.org/1999/xhtml"> Tab $(function() { $(".webwidget_scroller_tab").webwidget_scroller_tab({ scroller_time_interval: '5000', scroller_window_padding: '10', scroller_window_width: '350', scroller_window_height: '200', scroller_head_text_color: '#0099FF', scroller_head_current_text_color: '#666', directory: 'images' }); }); 牛*图%库 Tab2 Tab3 tab1 牛*图%库 tab2 牛*图%库 tab3 牛*图%库 这是js (function(a){ a.fn.webwidget_scroller_tab=function(p){ var p=p||{}; var s_t_i=p&&p.scroller_time_interval?p.scroller_time_interval:"3000"; var s_w_p=p&&p.scroller_window_padding?p.scroller_window_padding:"5"; var s_w_w=p&&p.scroller_window_width?p.scroller_window_width:"350"; var s_w_h=p&&p.scroller_window_height?p.scroller_window_height:"270"; var s_h_t_c=p&&p.scroller_head_text_color?p.scroller_head_text_color:"blue"; var s_h_c_t_c=p&&p.scroller_head_current_text_color?p.scroller_head_current_text_color:"black"; var d=p&&p.directory?p.directory:"images"; var dom=a(this); var s_length=dom.children(".tabBody").children("ul").children("li").length; var timer; var current = 0; var li_width; s_w_p += "px"; s_w_w += "px"; s_w_h += "px"; if(dom.find("ul").length==0||dom.find("li").length==0){ dom.append("Require content"); return null; } begin(); play(); function begin(){ dom.width(s_w_w); dom.height(s_w_h); li_width = parseInt(s_w_w)-2; dom.children(".tabBody").width(parseInt(s_w_w)-2); dom.children(".tabBody").height(parseInt(s_w_h)-28-4); dom.children(".tabBody").children("ul").width((parseInt(s_w_w)-2)*s_length); dom.children(".tabBody").children("ul").height(parseInt(s_w_h)-28-4); dom.children(".tabBody").children("ul").children("li").width(parseInt(s_w_w)-2); dom.children(".tabBody").children("ul").children("li").height(parseInt(s_w_h)-28-4); dom.children(".tabBody").children("ul").children("li").children("p").css("padding",s_w_p); dom.children(".tabContainer").children(".tabHead").children("li").children("a").css("color",s_h_t_c); dom.children(".tabContainer").children(".tabHead").children("li").children("a").click(function(){ current = dom.children(".tabContainer").children(".tabHead").children("li").index($(this).parent()); play(); stop() }); dom.hover( function(){ stop(); }, function(){ timer = setTimeout(play,s_t_i); } ); } function stop(){ clearTimeout(timer); } function play(){ clearTimeout(timer); var to_location = -(current*li_width)+"px"; dom.children(".tabBody").children("ul").animate({ left:to_location },500); dom.children(".tabContainer").children(".tabHead").children("li").children("a").css("color",s_h_t_c); dom.children(".tabContainer").children(".tabHead").children("li").removeClass("currentBtn") dom.children(".tabContainer").children(".tabHead").children("li").eq(current).children("a").css("color",s_h_c_t_c); dom.children(".tabContainer").children(".tabHead").children("li").eq(current).addClass("currentBtn"); if(current >= s_length-1){ current = 0; }else{ current ++; } timer = setTimeout(play,s_t_i); } } })(jQuery);
8. jQuery怎么实现tab页切换效果
简略写的
.big{ width:100px; } .tabtit ul li.active{ background:red; color:#fff; } .tabtit ul li:hover{ background:red; color:#fff; } .tabcon ul li{ width:100px; height:100px; } 1 2 3 1 2 3 var titList = $(".tabtit ul li"); //获取选项卡标题 var contList = $(".tabcon ul li");//获取选项卡切换的内容 //默认显示第一个选项卡标题 titList.eq(0).addClass("active").siblings().removeClass("active"); //默认显示第一个选项卡切换的内容 contList.eq(0).show().siblings().hide(); titList.click(function(){ var titnub = $(this).index(); //获取点击当前标题的index值 //当前点击的标题添加class,并移除同级的class $(this).addClass("active").siblings().removeClass("active"); //显示相同index值的内容 contList.eq(titnub).show().siblings().hide(); })