Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #906694
    ottobono
    Participant

    Hi Rue, sorry for not understanding what you told me 🙁 by the way… it works! Thank you!

    Edit: it works, but when I resize back to the desktop view the 4th sidebar stays on the bottom. How to bring it back?

    I now have this js code in custom

    jQuery(document).ready(function($) {
      $('.x-nav-tabs>li>a').off('touchstart');
      $('.x-nav-tabs>li>a').on('click', function() {
        $('html, body').animation().stop();
      });
    });
    
    jQuery(function($){
      $(window).on('load resize', function(){
        var W = $(window).width();
        if(W < 980){
          $('.x-sidebar').insertBefore('.x-main');
          $('#woocommerce_top_rated_products-2').appendTo('.x-main');
        }
      });
    })(jQuery);
    #907448
    Rue Nel
    Moderator

    Hello Again,

    To bring back the old position when your resize your browser, please update the code and use this instead:

    (function($){
      $(window).on('load resize', function(){
        var W = $(window).width();
        if(W < 980){
          $('.x-sidebar').insertBefore('.x-main');
          $('#woocommerce_top_rated_products-2').appendTo('.x-main');
        } else {
          $('.x-sidebar').insertAfter('.x-main');
          $('#woocommerce_top_rated_products-2').appendTo('.x-sidebar');
        }
      });
    })(jQuery);

    Hope this helps.

    #907632
    ottobono
    Participant

    IT WORKS! Yes, finally! Thank you very very much Rue!

    #907963
    Rupok
    Member

    You are welcome!

    Glad that it helped. Feel free to let us know if you face any other issue. We’ll be happy to assist you.

    Thanks for using X.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-873018 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>