Theme conflict with tabs plugin


#1

Hi,

I am using the livemesh tab plugin and it doesn’t seem to switch to the other tab. I contacted the plugin developer and told me it was a conflict with the theme and to check with the theme developer. I just wanted to make sure the instructions they gave me to fix the issue are correct before I go changing any files.

The page I am working on is: http://agft.flywheelsites.com/request-information/

Here are the instructions Livemesh gave me:

Looks like your theme is intercepting all click events and hence the event is not being passed out to other plugins. Pls let the theme developer know about or you can edit the file to remove this. The filename is js/main.min.js and you need to remove the line which starts something like this – t(‘a[href*=”#”]:not([href=”#”],.wc-tabs a,.activity-content a)’).click(function().

You can see that the click events on another tab are making the page scroll as per the code here –

    t('a[href*="#"]:not([href="#"],.wc-tabs a,.activity-content a)').click(function() {
                    if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) {
                        var e = t(this.hash);
                        if (e = e.length ? e : t("[name=" + this.hash.slice(1) + "]"),
                        e.length)
                            return t("html,body").animate({
                                scrollTop: e.offset().top - 70
                            }, 1e3),
                            !1
                    }
                })

Thank you for your help.

Kelsey


#2

Hi there,

What was suggested there works, but it should be handled in a different way which doesn’t imply you to modify the theme’s code or remove the smooth scrolling ability entirely.

Search for and install the TC Custom Javascript plugin (or a similar one if you have any preference) and add this code:

jQuery(document).ready(function ($) {
    $( ".lsow-tab-label").unbind( "click" );
});

Vlad


#3

Hi Vlad,

I downloaded and added the TC JavaScript plugin and added the code, but I still get the same issue occurring.

Thanks,
Kelsey


#4

I see, the custom Javascript is probably loading before the theme’s files so the code doesn’t take effect.
I’ll just update the theme today hopefully. If there’s no update notice in a few hours, feel free to tell me.

Vlad


#5

I received the update and updated the theme, unfortunately the tabs still won’t work. I also tried clearing the cache and it still didn’t work.

Thanks,
Kelsey


#6

Hi Vlad,

My apologies, I wasn’t thinking as I received a plugin update for pagebuilder but not for the theme. My theme is still version 1.16.

Thanks,
Kelsey


#7

Really sorry about the delay, I was away for the weekend.

The update is now live. Let me know if it solves your issue please.

Vlad


#8

Hi Vlad,

No problem, everyone deserves some time off. I hope you had a good weekend!

I updated my theme but it seems that the tabs are still scrolling instead of switching back and forth. I just tested the widget on another one of my sites using Perth Pro theme and it seems to be working fine on there.

Thanks,
Kelsey


#9

Hi,

I think you’re seeing cache. I just had a look at your site and it seems to work fine. Hit CTRL F5 please to clear the cache.

Vlad


#10

Perfect, thank you so much for doing that update!