【发布时间】:2012-05-17 23:12:55
【问题描述】:
我有一个功能,比如说
function runSomething()
{
alert("hello");
}
我有window.onhashchange = runSomething;
在我的代码中,我调用window.location.hash = "#processsection"
runSomething 运行,但是它在页面执行到#processsection 之前运行...我怎样才能让它只在我在#processsection 之后运行?
【问题讨论】:
-
“之后”是什么意思?在 UI 滚动到那个锚点之后?
-
是的!在 JQuery Mobile 滚动到那里之后!基本上,在 runSomething 完成之前,我看不到它在做什么!
-
换句话说,它做了一些事情,我没有看到它,因为它在完成之前不会进入那个部分
-
他们有,但是已经很晚了,你只给了他们 12 分钟。 This is not 热线 :)
-
#processsection 是一个页面吗?即
<div data-role="page" id="processsection">。给我们更多的代码,这样我们就能看到更大的图景。或者,如果您可以制作一个 jsfiddle 来说明问题。
标签: javascript jquery-mobile hashchange