开发者

jQuery Tabs and document.ready fn

I used jQuery tabs to implement different versions of the same page in 3 tabs... I found out that if I load the first page then second and third tabs dont implement $.ready and whts insid开发者_C百科e it.

If I load the third tab then all tabs have proper jquery job done. The case is when I proceed forward I have the problem.

Is there any way to work around this?!


I don't know if this will work, but you could try to attach your $.ready code to a custom event on, say.. your pages <body> tag. That way, from within the parent page (the one with the tabs) you can trigger that custom event, something like:

 $("#custom_body_id").trigger("event_name");

You can trigger that event on the load event triggered by the tabs plugin. I'd recommend checking out the plugin's doc

Hope that helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜