Slide 切换通过 load() 动态加载的表
我正在通过 load() 方法将表格加载到我的页面中。
表的第一行是可单击的,单击时必须切换表的其余部分。我正在使用的代码如下:
$('.collapsable tr:first').live('click', function() {
$('.collapsable tr:first').nextAll().slideToggle("fast");
});
我希望在加载页面时隐藏表格。我尝试过使用: $('.collapsable tr:first').live('load', function() { 但没有运气。
还尝试把这个: $('.collapsable tr:first').nextAll().slideToggle("快");进入 document.ready 函数,但它也不执行任何操作。
有人可以帮忙吗?
谢谢
I'm loading a table into my page via the load() method.
The first row of the table is click-able and when clicked must toggle the rest of the table. The code I am using is below:
$('.collapsable tr:first').live('click', function() {
$('.collapsable tr:first').nextAll().slideToggle("fast");
});
I want the table to hide when the page is loaded. I have tried using:
$('.collapsable tr:first').live('load', function() {
but with no luck.
Also tried just putting this:
$('.collapsable tr:first').nextAll().slideToggle("fast"); into the document.ready function but it also does nothing.
Can anyone please help?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能对你有帮助。
使用 .click 而不是使用 .live :
This may be help you.
Use .click instead of using .live :