简体   繁体   English

等到加载内容

[英]Wait until loading content

I'm trying to load a table by jQuery load then zebra the table but the content of table is loaded but the zebra fails. 我正在尝试通过jQuery加载然后通过zebra加载表,但是加载了表的内容,但是zebra失败。 If the page is loaded and the table exists the zebra function works. 如果页面已加载且表存在,则zebra函数起作用。

$("#processTab").load("URL");

$(".Innertable tr:nth-child(even)").css("background-color", "#eee");

You need to zebra your table after the table has been loaded. 加载表后,需要对表进行斑马处理。 To detect when the table has been loaded use the callback of the load method. 要检测何时已加载表,请使用load方法的回调。

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

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