简体   繁体   English

快速后退按钮单击使页面过渡不起作用

[英]fast back button clicking makes page transitions not work

I'm a total amateur at jQuery, HTML, css and everything and I'd be really grateful if anyone with some more knowledge could help me. 我是jQuery,HTML,CSS和其他一切的业余爱好者,如果有更多知识的人可以帮助我,我将非常感激。 This is a site I'm in the middle of making for my girlfriend: www.sharyncunneen.com. 这是我正在为我的女友制作的网站:www.sharyncunneen.com。

If you click around on the buttons there you'll notice I've done some animated page transitions involving the opacity, size and position of the buttons. 如果在按钮上单击一下,您会注意到我已经完成了一些动画页面过渡,涉及按钮的不透明度,大小和位置。 The problem is when I click the browser back button: if I click it at a reasonably slow pace the transitions still work fine but if I click several times fast in a row it's like the jQuery/javascript doesn't get time to catch up or something. 问题是,当我单击浏览器后退按钮时:如果我以相当慢的速度单击它,则过渡效果仍然很好,但是如果我连续快速单击几次,就好像jQuery / javascript没有时间赶上或的东西。 I don't really know. 我真的不知道

Do you need to see files or code? 您需要查看文件或代码吗? I won't include anything else yet. 我什么也不会包括。 I think it's better to let you tell me what information would help you because I'm not sure about the best way to proceed on this forum and I'd like to learn from experienced users. 我认为最好告诉您哪些信息对您有所帮助,因为我不确定继续此论坛的最佳方式,我想向经验丰富的用户学习。

I don't see any transition at all o0 Anyway, you can use the jquery queue function. 我完全看不到任何过渡o0,您可以使用jquery队列功能。 Start a queue when starting the animation et clear it when your transition is finished. 启动动画时启动队列,并在过渡完成后将其清除。 You can also limit the number of queued events to avoid the website getting crazy with speedy click. 您还可以限制排队事件的数量,以避免快速点击使网站发疯。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM