Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1324773

    Hello,

    I have a question about the Tabcontainers (DE: “Reiter”). Everything works well, desktop view is pretty good, but in the mobile view I have a problem.
    Everytime I click around the tabs (on mobile), the position is not correct. I think this is, because I made the Header in a fixed position on mobile (no scroll, no down-scale.

    Do you think there is a posibility to give the scroll-offset another, higher value?

    #1325312

    Hey ronellenfitsch,
    Thank you for your patience and the link to your site, I believe that if you edit the file at \enfold\config-templatebuilder\avia-shortcodes\tabs\tabs.js and on line 129 look for:
    scoll_target = el_offset - 50 - parseInt($('html').css('margin-top'),10); and change the 50 to 180 like this:
    scoll_target = el_offset - 180 - parseInt($('html').css('margin-top'),10);
    Then clear your browser cache and any cache plugin a few times, and then check.

    Best regards,
    Mike

    #1325546

    Hey Mike!

    I did your changes and everything works fine! Thank you a lot!

    I tried to do it in the child-theme with the same folder-structure, but this is not working I guess, but It isn’t tragic.

    #1325565

    Hi,
    Glad to hear this helped, if you are using the child theme that came with the theme then you should see this near the top of the functions.php:

    function avia_include_shortcode_template( $paths )
    {
    	if( ! is_array( $paths ) )
    	{
    		$paths = array();
    	}
    	
    	$template_url = get_stylesheet_directory();
    	array_unshift( $paths, $template_url . '/shortcodes/' );
    
    	return $paths;
    }
    
    add_filter( 'avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1 );

    then when you copy the tab sortcode folder from \wp-content\themes\enfold\config-templatebuilder\avia-shortcodes\tabs\ you should put it in the /shortcodes/ directory in your child theme, like this \wp-content\themes\enfold-child\shortcodes\tabs\ ok so now please try adding this function to your child theme functions.php:

    function wp_change_aviatabjs() {
       wp_dequeue_script( 'avia-module-tabs' );
       wp_enqueue_script( 'avia-module-tabs-child', get_stylesheet_directory_uri().'/shortcodes/tabs/tabs.js', array('jquery'), 2, true );
    }
    add_action( 'wp_print_scripts', 'wp_change_aviatabjs', 100 );

    Then clear your browser cache and any cache plugin, a couple on times, and check.

    Best regards,
    Mike

    #1325572

    Hey Mike!

    Thank you again! My original functions.php from Enfold child-theme was empty (only Add your own functions here.), so I can’t find your first Code in here. In the functions.php of parent enfold I can’t find it also. Do I need this?

    Your other advice sounds legit, I will try It.

    #1325721

    Hi,
    I linked the child theme that should have been included with the latest version, in the full theme and docs download from Theme Forest, you can replace yours with this or copy the function I mentioned above to yours.
    It is key that you create a /shortcodes/ directory in your child theme to place your modified shortcode directory, like I described above.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.