English 中文(简体)
Hluid jjQuery 页面过渡
原标题:Fluid jQuery page transition

因此,我的问题是:我正在设计一个网站,用jQuery转换网页的主框架。索引页面的横幅有450个高度,到其他页面时降为200px。主页上有一个按钮(大约一个向下页),该按钮应该飞回页面的顶部,而THN则负责页面的中转。这里的问题是,每当我单击按钮时,它就会进行页面的过渡 WHILE 滚动,从而使它看起来像一个草率的过渡。

以下是我的功能调用:

$( a[href=#services] ).click(function(){
    $( html, body ).animate({scrollTop:0},  slow ).delay(1500).animate({scrollTop:0},  slow );
    $.indexClear();
    $.serviceSET();
    $.servicelinkSET();
    return false;
});

函数调用由隐藏()和淡化In()组成,没有其它内容。知道吗?此外,延迟功能似乎没有正常工作。

最佳回答

我哪里都看不到你的卷轴左/右代码,但听起来你需要回调一下。一旦页尾的动画完成后,请运行左/右代码。

$( element ).animate({scrollTop: 0}, function() {
    //callback is called when first animation finishes
    $( element2 ).animate({left: 100});
});
问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签