AJAX/回调问题 [英] AJAX/Callback Problem

查看:104
本文介绍了AJAX/回调问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一页上有两个回调.一个是隐藏的.当我从第一个回调中单击一个项目时,它会触发一个onclick事件,该事件使第二个回调可见,并更改页面的布局,使其看起来像您转到另一个页面.

问题在于,有时第二个回调会在布局更改之前被调用并变得可见.我需要确保在布局更改完成之前,回调是不可见的.

I have two callbacks on one page. One is hidden. When I click on an item from the first callback it''s fires an onclick event which makes the second callback visible and changes the layout of the page to look like your going to another page.

The problem is that sometimes the second callback is called and becomes visible before the layout changes. I need to ensure that the callback isn''t visible until the layout change completes.

推荐答案

也许有一个事件可以挂接到,所以当元素变得可见,然后该代码调用下一个回调?
Perhaps there''s an event you can hook into, so that when the elements become visible, then your next callback is called by that code ?


这篇关于AJAX/回调问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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