tabs & base

1 reply · opened Jun 9, 2016

SspidometrsJun 9, 2016

Hello!

My CMS should have the <base href="http://mysite.com/">
I created a website with Canvas 3.0 and added JS code that works fine: http://titanium.oscommerce.ru

<script type="text/javascript">
// fix jQuery base tag bug
$.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);
};
</script>

Now I create another site with Canvas 4.0, and added that the JS code, but it does not work.
Now I have a problem with tabs and a base for Canvas 4.0.

Do you know the difference between Canvas 3.0 and Canvas 4.0, and why JS code does not work?
You can fix the JS code or Canvas 4.0?

SspidometrsJun 9, 2016

Resolved.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard