滚动到按钮上的模式窗口顶部单击
我正在使用Elementor Page Builder在WordPress上构建一个站点,在单击表单上的“下一步”时,我很难将用户发送回模式的顶部。
这是我一直在尝试的代码,这是当前托管的页面: http:http:http:http:// doortouk-co-uk.stackstaging.com/home/
(可以通过单击页面底部的“立即应用”按钮打开模式,第3、4和5节具有较长的部分这需要滚动才能达到最高功能)
jQuery(document).ready(function () {
jQuery('.e-form__buttons__wrapper__button-next').click(function(){
jQuery(".dialog-widget-content").scrollTop(0);
});
})
任何帮助都将不胜感激!
edit - 解决方案是目标.dialog-lightbox-message
I'm building a site on Wordpress using Elementor page builder, and I'm having trouble sending the user back to the top of a modal when clicking 'next' on a form.
Here's the code I've been trying, and here's the page it's currently hosted: http://doortouk-co-uk.stackstaging.com/home/
(The modal can be opened by clicking the 'Apply Now' button at the bottom of the page, section 3, 4 and 5 have the longer sections that require the scroll to top functionality)
jQuery(document).ready(function () {
jQuery('.e-form__buttons__wrapper__button-next').click(function(){
jQuery(".dialog-widget-content").scrollTop(0);
});
})
Any help would be appreciated!
Edit - the solution was to target .dialog-lightbox-message
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
努力查看您的网站并找到问题。但是下次,如果您制作代码段,我们可以用来帮助您。无论如何,欢呼并享受!
我做了一个片段,以仔细检查我的工作是否正确。您需要的是:
jQuery(“。dialog-witget-content”)。动画({scrolltop:$(“。dialog-witget-content”)},0);
ps,在下面运行代码段。 )
Took the effort to look at your website and find the issue. But for the next time, it would be great if you make a code snippet we can use to help you. Anyway, cheers and enjoy!
I made a snippet to double check if what I was doing was correct. The thing you need would be:
jQuery(".dialog-widget-content").animate({ scrollTop: $(".dialog-widget-content")}, 0);
PS, run code snippet below. ;)