jQuery's load method allows loading page fragments by passing in a selector as part of the URL.
It would be very useful if jQuery UI tabs could do the same in Ajax mode - for pretty much the same reason the load method supports this.
At first I figured this was a common issue and I was just missing something, but some investigation of the source confirms that this is currently not supported.
Thoughts, ideas?
Update:For the moment, I've worked around this with an ugly hack:
- $(".ui-tabs").tabs({
- load: function(event, ui) {
- var content = $("#main", ui.panel).html();
- $(ui.panel).html(content);
- }
- });
However, that leads to the original content flashing briefly before the contents are reset (also because the remote page's style sheets and scripts are being loaded) - unfortunately, there doesn't seem to be a hook that would allow us to suppress this (by hiding the panel contents before the original is inserted).