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

    Ulrich M
    Participant

    Hi there,

    as asked in another thread (https://theme.co/x/member/forums/topic/page-scrolls-up-and-down-when-clicking-on-tab-nav-items-and-accordian-items/page/2/) I’m opening a new one. My problem seems to be different.

    I’m using the tabbed navigation with three tabs and Revolution Sliders inside the tabs. When I scroll down on the page and click another tab it takes me back to the top like a #top link.

    I hope you can help me with this one and thanks for the fast response in the other thread.

    #227559

    Ulrich M
    Participant
    This reply has been marked as private.
    #227676

    Thai
    Moderator

    Hi There,
    Upon checking your website, I can see that the tabbed navigation works fine on my end.
    Already tested on Chrome, Firefox, Safari, … browsers, please try to clear your browser caches.
    Hope it helps.
    Thanks.

    #240605

    Ulrich M
    Participant

    Hi,

    sorry for the late response (gotta work on another project), I cleared the cache and tried different browsers but it still jumps to the top on Firefox, on Chrome it doesn’t take me to the top but a few lines up.

    Try to scroll down so you just see the tabs on the browsers top and then click on another tab.

    Thanks.

    #240620

    Zeshan
    Member
    This reply has been marked as private.
    #241355

    Ulrich M
    Participant
    This reply has been marked as private.
    #241362

    Rue Nel
    Moderator

    Hello There,

    It looks like this is a javascript issue. Please try to change your javascript code you have added in your customizer to something like this;

    jQuery(document).ready(function($) {
       $('.x-accordion-toggle, .x-nav-tabs-item a').click(function(e) {
          $('html, body').stop();
          e.preventDefault();
       });
    });

    You have added several blocks of javascript in your customizer. Just make sure to add e.preventDefault(); so that it will prevent any other actions after doing that whatever actions you have in your code.

    Hope this helps.

    #242006

    Ulrich M
    Participant

    Hi,

    I’ve the following javascript for fixing a problem with the header widget map shortcode and with sliders inside tabs.

    jQuery(function($){ 
    
    	$('a.x-btn-widgetbar').click(function(){ 
    		var reloaded = $(this).data('map-reloaded');
    		
    		if( reloaded !== true) {
    			var iframe = $('.x-widgetbar .x-map iframe' ).get(0);
    			iframe.src = iframe.src;
    
    			$(this).data('map-reloaded', true );
    			}
    
    	});
    	
    	$(document).ready(function(){
    		$('.x-tab-content>.x-tab-pane:not(.active)').addClass('slider-visibility-fix');
    		$(window).resize();
    	});
    
    	$('.x-nav-tabs-item a').click(function(){ 
    		$( $(this).attr('href') ).removeClass('slider-visibility-fix');
    		$(window).resize();
    	})
    
    });

    Could the windows resize cause the jump to the top? I tried to add the your javascript above that one but it still jumps to to the top.

    Thanks!

    #242008

    Christopher
    Moderator

    Hi there,

    Sorry I’m unable to check your site.
    I tried without http:// but no luck.
    Please check your URL.

    Thanks.

    #244914

    Ulrich M
    Participant
    This reply has been marked as private.
    #244933

    Nico
    Moderator

    Glad to hear that. It must be your cache.

    Let us know if you need anything else.

    Thanks. Have a great day 🙂