Hey guys,
I've gotten back to Revo recently and have been playing around with it for a project and I've encountered something that had me almost pointing at MODX due to its obscure nature. I'm using JQuery tabs 1.9.2 (latest one out) and for some odd reason, my homepage kept appearing inside the tab container! But a couple of hours of trying to isolate the problem, I found out that it's due to a change in how Jquery behaves involving the <base> tag. Simply put, I didn't see the problem when I was making my static HTML pages until I loaded them up on MODX when I needed to put in a <base> tag. Now this is an odd problem because according to the JQuery guys, this isn't a bug and the issue seems to be solved by taking out the <base> tag. But from a CMS user's stand point, I can see that not using the <base> tag is not feasible.
In case anyone's interested in a hack, see solution by oZone
http://bugs.jqueryui.com/ticket/8637 below (just put it before using the .tabs() function:
$.fn.__tabs = $.fn.tabs;
$.fn.tabs = function (a, b, c, d, e, f) {
var base = location.href.replace(/#.*$/, '');
$('ul>li>a[href^="#"]', this).each(function () {
var href = $(this).attr('href');
$(this).attr('href', base + href);
});
$(this).__tabs(a, b, c, d, e, f);
};
Does anyone have a better suggestion to work around this?
EDIT: All right, I did another test. My tab href values were just set to "#tab-whatever", but it seems to make the tabs work with the base without any work around, hrefs need to be expressed as "[[~[[*id]]]]#tab-whatever"
[ed. note: diatomin last edited this post 13 years, 10 months ago.]