如何在使用jQuery Accordion时停止页面向下滚动 [英] how to stop page scrolling down while using jQuery Accordion

查看:66
本文介绍了如何在使用jQuery Accordion时停止页面向下滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用jQuery UI Accordion,
我遇到的一个问题是:
在第二个选项卡中,有一个非常长的表单。
每当用户进入第二个标签页时,页面会自动向下滚动到表单底部。即使我硬编码并将焦点设置为表格的第一个文本框。

I am using jQuery UI Accordion in my App, one problem I have is: inside the 2nd tab, there is a very long form. Everytime when user come to the 2nd tab, the page automatically scroll down to the bottom of the form. even after I hard code and set the focus to the first text box of the form.

任何想法?

提前谢谢大家

推荐答案

我试图在改变指数的同时起诉焦点,但是,至少,它并没有为我工作。
这是我的最终解决方案,关闭手风琴UI中的动画:

Well i have tried to sue focus while index change, however, at least, it doesn't work for me. here is my final solution which is turn off the animation in accordion UI:

$("#accordion").accordion(
                     {
                         autoHeight: false,
                         animated: false,
                         active: parseInt(index),
                         event: ""
                     }
);

感谢您的回答。

这篇关于如何在使用jQuery Accordion时停止页面向下滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆