呈现文档后触发事件 [英] fire an event after document is rendered

查看:41
本文介绍了呈现文档后触发事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在jQuery中完全呈现文档主体后如何触发事件或调用方法

How to fire an event or call a method after the document body is fully rendered in jQuery

推荐答案

关于您在评论中的澄清:

With respect to your clarification in the comment:

这取决于您如何生成表(更多信息会很好).但总的来说,没有,没有任何事情可做.完成表的构建后,必须调用该函数.

It depends on how you generate the table (more information would be good). But in general, no, there is no event for that. You have to call the function when you finished building the table.

buildTable();
hideControls();

如果使用Ajax构建表,则必须将控件隐藏在Ajax请求的回调中.

If you use Ajax for building the table, then you have to hide the controls inside the callback for the Ajax request.

更新:

您还可以考虑对该页面使用其他CSS样式表,以隐藏控件元素.

You could also consider to use a different CSS stylesheet for that page which hides the control elements.

这篇关于呈现文档后触发事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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