Viewing 27 posts - 1 through 27 (of 27 total)
  • Author
    Posts
  • #528330

    Hi There,

    Thanks for the solution for desktop PCs given here: https://kriesi.at/support/topic/problems-with-100-stretch/

    Unfortunately not it doesn’t work on mobile devices anymore. There now the segments are too short.

    Can this be fixed for both?

    Thanks

    #529346

    Hey elbnetz!

    I checked your website on mobile and it looks fine to me. Can you show us what you want to achieve please? you can use imgur.com or dropbox to add some screenshots/a mockup.

    Regards,
    Andy

    #529393

    Here you go:

    #529703

    Hey!

    Thank you for the update. That’s what I’m trying to explain here: https://kriesi.at/support/topic/100-content-element-height-is-not-100/#post-462350

    The default height of the preceding color sections are correct. The first color section is shorter than the other color sections because it has to be visible above the fold.

    EDIT: Instead of changing the section height calculation. try to alter where the scroll target landed. https://kriesi.at/support/topic/2nd-and-3rd-full-screen-video-sections-are-too-long-due-to-header/#post-440743

    Regards,
    Ismael

    #529804

    Well, no, that is not correct, I’m afraid.

    The situation is like this:
    The standard is, that the hight and scroll works correct on the first section always and on mobile devices for all sections. BUT it doesn’t works well on desktop. It is NOT only that the scroll target is the problem, it also the height. If we would change only the the scroll target, part of the image would be hidden behind the Header (wich is not transparent in our case).

    With the solution provided here https://kriesi.at/support/topic/problems-with-100-stretch/ now it works well on desktop, but sections are too short on mobile. That is understandable, as segments were 100% bevor this change and are now too short.

    The SOLUTION would be to allow that change https://kriesi.at/support/topic/problems-with-100-stretch/ only on desktop, but not on mobile. It should be possible to change the javascript like that, isn’t it?

    Thanks!

    #529811

    We tried this successfully within shortcodes.js:

    		if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && 'ontouchstart' in document.documentElement)
    			{
    				subtract.each(function(){ wh100_mod -= this.offsetHeight - 1; });
    			}
    			else
    			{
    				subtract.each(function(){ wh100 -= this.offsetHeight - 1; wh100_mod -= this.offsetHeight - 1; });
    			}
    • This reply was modified 9 years ago by elbnetz.
    #530502

    Hi!

    Did it work for you? You can also try to change the condition to “$.avia_utilities.isMobile”.

    Best regards,
    Ismael

    #530602

    Hi There,

    I don’t know anything about JavaScrip, just put one and one together. Where should I use “$.avia_utilities.isMobile”?

    Thanks

    #530660

    Hey!

    Did your modification work the way you expected? Like this:

    if($.avia_utilities.isMobile)
    			{
    				subtract.each(function(){ wh100_mod -= this.offsetHeight - 1; });
    			}
    			else
    			{
    				subtract.each(function(){ wh100 -= this.offsetHeight - 1; wh100_mod -= this.offsetHeight - 1; });
    			}

    Regards,
    Ismael

    #530696

    Hi There,

    both solutions are working well.

    BUT now we have another problem. Now that we are using the script within child theme

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

    The toggles are not working.

    Any idea why?

    Thanks

    #531461

    Hi!

    can you provide us a link showing the issue please? try to deactivate all plugins while testing.

    Regards,
    Andy

    #531615

    Here you go.

    Thanks, T.

    #535979

    Hey!

    Can you please turn that account into an Administrator?

    Cheers!
    Josue

    #536397

    Sure, done.

    Thanks, T.

    #537879

    Hi!

    Did you set the border color to white? You can’t see the toggle signs and the toggle border because the border color is set to white. Please adjust the color in Enfold > General Styling > Main Content panel > Border colors. What happen if you use the default shortcodes.js file? Relocating the shortcodes.js file in the child theme is not update-proof and it actually defeats the purpose of using a child theme because once we change something in the original file, the site will still be using the old version of the file in the child theme so you have to override it again with the new file. Please add the modifications in the parent theme files then create a change log in case you update the theme again. And yes, unfortunately, you have to do the modifications every time you update the theme.

    Best regards,
    Ismael

    #538097

    Hi There,

    we know, tat moving the shortcodes.js into the cild theme is not the best idea, but what can we do, if the 100% Stretch is not working as expected and we need to change things?

    Bestes, T

    #540089

    Hey!

    Please try to disable the modifications temporarily then use in the functions.php file:

    // color section height
    add_action('wp_footer', 'ava_custom_section_height', 50);
    function ava_custom_section_height(){
    ?>
    <script>
    (function($){
        $(window).resize(function() {
            $.avia_utilities = $.avia_utilities || {};
    
            if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && 'ontouchstart' in document.documentElement)
        	{
        		$.avia_utilities.isMobile =  true;
        	}
        	else
        	{
        		$.avia_utilities.isMobile =  false;
        	}
    
    		var win		= $(window),
    		calc_height = function() {
    
    			var subtract	= $('#wpadminbar, #header.av_header_top:not(.html_header_transparency #header), #main>.title_container'),
    				wh100 		= win.height();
    
    				subtract.each(function(){ wh100 -= this.offsetHeight - 1; });
    
    			$('.av-minimum-height-100, .av-minimum-height-100 .container').css({
                    'height' : wh100,
                    'overflow' : 'hidden'
                });
    		}
    
            if(!$.avia_utilities.isMobile) {
                win.on( 'resize', calc_height);
        		calc_height();
            }
    
        }).resize();
    })(jQuery);
    </script>
    <?php
    }
    

    Let us know if it works.

    EDIT: We modified the code a bit.

    Best regards,
    Ismael

    #540595

    Hi Ismael,
    Thanks for the solution! It almost works. Only the “scroll down arrows” is shown on the first section but are missing on subsequent sections.
    If that could be solved it is a great solution.

    Many Thanks, T.

    #541352

    Hi!

    Please create a duplicate of the home page somewhere then we’ll test the script. What happens when you change this line:

    'height' : wh100,
    

    … to this?

    'min-height' : wh100,
    

    A screenshot of the issue will help as well.

    Regards,
    Ismael

    #541390

    Hi There,
    The change doesn’t work. We copied the page for testing.

    Thanks!

    #543474

    Hi!

    I activated the script and the scroll down arrows are visible. Screenshot:

    The arrow points to the actual scroll down arrow and the height property added to the color section container.

    Cheers!
    Ismael

    #544328

    Well, as we had a presentation to the client. We had to change to the original solution, when you checked.

    #544960

    Hey!

    We modified the code a bit so that the color section container’s height is the same as the parent container.

    Cheers!
    Ismael

    #545194

    Sorry, wich code did you modify and where?

    Thanks, T.

    #545248

    Hi!

    I think Ismael is referring to the code he provided to you here. Check your functions.php.

    Regards,
    Andy

    #545943

    Hi There,

    There is no such code in the functions.php. Would you mind posting the changes here?

    Many Thanks, T.

    #547013

    Hey!

    ehm that is why he told you to put in inside functions.php? Please let us know when you are done with it and still need help.

    Cheers!
    Andy

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