Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #184324

    Gartenfrosch
    Participant

    Hi,
    after updating the theme and plugins to the following:
    x-theme: 3.1.1
    Visual Composer 4.3.5
    x-shortcodces 2.6.1

    The accordion moves about (up and down) when clicked on. It wasn’t this bad before. Somnetimes it moves out of view.
    You can see that on the site: http://www.vonriegen.net and http://www.vonriegen.net/coaching-im-hamburger-raum/
    My login details are provided in the next post. Any help would be greatly appreciated. Thanks.

    #184330

    Gartenfrosch
    Participant
    This reply has been marked as private.
    #184880

    Friech
    Moderator

    Hi there,

    Thanks for writing in! sorry for the trouble with this issue please follow this post for the solution.

    Cheers!

    #185009

    Gartenfrosch
    Participant

    Hi and thanks for your suggestion.
    It doesn’t work for me.
    I have this code in the javascript box:

    //Smooth scrolling from down arrow to target band
    jQuery(function($){
      $('.button-down-scroll').click(function(e){
        e.preventDefault();
       
        $('html,body').animate({
          scrollTop: $('#' + $(this).attr('href').split("#").slice(-1)[0] ).offset().top - $('.x-navbar').height()
        },700 ,'swing');
      });
    });
    
    //Stop mobile menu from opening submenus per default
    var menu_breakpoint = 979;
    jQuery(function($){
    
    		$('.s-mobile-collapse > a').click(function(e){
    			var current_width = $(window).width();
    			if(current_width > menu_breakpoint)	return true;
    			else {
    				e.preventDefault();
    				$('ul.sub-menu', $(this).parent() ).each(function(){
    					if( $(this).hasClass('mobile-collapsed') ) $(this).removeClass('mobile-collapsed');
    					else $(this).addClass('mobile-collapsed');
    				});
    			}
    		});
    
    		$(window).resize(function(){
    			toggle_mobile_menu_visibility($);
    		});
    
    		toggle_mobile_menu_visibility($);
    });
    
    function toggle_mobile_menu_visibility($) {
    			var current_width = $(window).width();
    			if (current_width > menu_breakpoint) {
    				$('.s-mobile-collapse > ul.sub-menu').removeClass('mobile-collapsed');
    				$('#menu-main').addClass('sf-menu');
    			} 
    			else {
    				$('.s-mobile-collapse > ul.sub-menu').addClass('mobile-collapsed');
    				$('#menu-main').removeClass('sf-menu');
    			}
    }
    

    The smooth scroll extension is not installed because I have not needed to use it yet and everything was fine before the update.
    Can you maybe have a look at it?
    Thanks for your help 🙂

    #185532

    Christopher
    Moderator

    Hi there,

    Please try this code instead of our last suggestion:

    jQuery( function ( $ ) {
    
    $(document).on('click', '.x-accordion-toggle', function( e ){
    $('html, body').stop();
    });
    
    });

    Hope it helps.

    #185632

    Gartenfrosch
    Participant

    That did it.
    Thank you so much 🙂

    #185993

    Rubin
    Keymaster

    You’re welcome!

    #696260

    Sebastien M
    Participant

    Same problem but the last fix did not work for me. the accordion when clicked jumps on the page irradicly.
    http://www.2smartgraphique.com/faq/

    Wordpress 4.3.1 running Xtheme Version: 4.1.0

    #696544

    Lely
    Moderator

    Hello Sebastien,

    Upon checking the following code was causing some error:

    $(document).on('click', 'li', function( e ){
    $('html, body').stop();
    });

    Please update to this :

    jQuery( function($) {
    $(document).on('click', 'li', function( e ){
    $('html, body').stop();
    });
    });

    I also notice that the code above was not added. Please copy entire code above on your custom > Javascript.

    Hope this helps.