[英]Tab jquery auto scroll with click
I'm been looking jquery auto scroll on tab, then i found 我一直在寻找标签上的jQuery自动滚动,然后我发现
http://codepen.io/yanxurui/pen/rVovyN http://codepen.io/yanxurui/pen/rVovyN
But i want the tab change on click, not hover. 但我想点击更改标签,而不是悬停。 Then i try change this
然后我尝试更改此
function currentHover() {
$(".tabAuto li").hover(function() {
}
to 至
function currentHover() {
$(".tabAuto li").click(function() {
}
but the auto scroll start jumping around the tab. 但是自动滚动开始在选项卡附近跳跃。 I like to know if there is any good approach to click on tab
我想知道是否有什么好的方法可以单击选项卡
You also have to change the .hover
to .click
in the contentHover
function: 你也必须改变
.hover
到.click
在contentHover
功能:
function contentHover() {
// in this function change hover to click.
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.