Javascript code not working

Hi Themeco,

Some time ago I had a problem when a button wasn’t working on mobile, but was working from PC.

Rad helped me fixing this by inserting this custom JS:

jQuery(document).ready(function($){
setTimeout ( function() {
$(’.floating-menu a, a[href^="#"]’).off(‘touchstart touchend’);
}, 1000 );
});
The code is still there, but for some reason button stopped working on mobile phones…
I’m talking about the ‘‘Get a free quote’’ button in the very end of our website: https://ponylab.studio

And here is the link to the initial theme where Rad has helped:

Thank you!

Hello @Kashevko,

Thanks for asking. :slight_smile:

As our support policy states, we can’t provide support for custom codes as it fall outside the scope of support. Depending on the usage custom codes may or may not work.

To give you some headstart I checked the website and can see that Get Free Quote is having a different class name. You need to check the class name and that should fix the problem.

If you are not comfortable with custom codes, I suggest you to get in touch with a developer for some help.

Thanks for understanding.

Hi Prasant, thanks for the answer!

But why it works on the PC, but not on mobile?

Hi again,

Try adding this code as well in the Theme Options > JS:

jQuery(document).ready(function($){
    $('.btnsx-btn').on('touchstart touchend', function(){
        $(this).click();
    });
});

Don’t forget to clear all caches including your browser’s cache after adding the code. Let us know how this goes!

Hi Nabeel,

Thank you sooooo much!
That fixed the issue in a moment.

Thanks again for a great help.

Glad we were able help :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.