Home Forums WoodMart support forum Container Not working on mobile

Container Not working on mobile

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #152751

    [email protected]
    Participant

    Hello,
    On my site you can see a hyperlink called “View Full Product Description” before the Add to cart button. I added this from the ‘Before “Add to cart button” text area’ under Theme Setting -> Product Page.

    The link is #tab-description. it works well on desktop but I noticed it does not work on mobile. Is there a reason for this? how to make it work?

    Thank you

    #152798

    Artem Temos
    Keymaster

    Hello,

    The problem is that the first tab is closed on mobile devices. Try to remove that code from the Custom JS section and check how it works.

    Kind Regards

    #154761

    [email protected]
    Participant

    Hello,
    Yes if I remove the Custom JS it works. But why is that relevant? If all tabs are closed and I click on the “customer reviews” link right under the title, it goes to the #reviews container and opens it.

    I want the JS top leave all tabs closed by default when the user loads the page (because it takes up too much space which reduces the chances that he will see the related products section under that) but if he clicks the link it should do just like the reviews link.

    Is it because of the code? see:
    setTimeout(function() {
    if( jQuery(window).width() > 1024 ) return;
    var $tab = jQuery(‘.woodmart-tab-wrapper’).find(‘a.active’);
    $tab.siblings(‘.wc-tab’).hide();
    $tab.removeClass(‘active’);
    }, 10);

    Thanks

    #154796

    Artem Temos
    Keymaster

    Sorry, but it is not possible to keep some tab opened with that code. Unfortunately, there is no fix for this and that is the way WooCommerce works.

Viewing 4 posts - 1 through 4 (of 4 total)