Viewing 14 posts - 31 through 44 (of 44 total)
  • Author
    Posts
  • #591658

    Recovered code from backup, thanks.

    • This reply was modified 8 years, 8 months ago by M1000000.
    #591674

    Hey!

    I asked Ismael to check the thread. Please kindly wait to hear from him

    Regards,
    Yigit

    #591707

    Afraid fixed background still has same bug with new code in place :(

    #591995

    Hi!

    Could you please provide a screenshot of the issue? We test it again on the emulator and it seems to set the background-attachment to scroll as it should. We tested it on the test page: http://enfold.wpcare.co.uk/fixed/

    Cheers!
    Ismael

    #592229

    None of the browser based emulators I have tried can replicate the issue (this is still the original problem) – only visible on actual device and Browserstack:

    • This reply was modified 8 years, 8 months ago by M1000000.
    #594018

    Hi Guys – was this what you wanted? Any updates?

    Thanks.

    #594865

    Hey!

    Sorry for the delay. Please add this css code:

    .avia-msie .avia-full-stretch {
        background-size: 100% 100% !important;
    }

    If it doesn’t work, remove the css code then replace the code in the functions.php file with the following:

    // windows phone fixed background fix
    add_action('wp_footer', 'ava_custom_script_bgfixed');
    function ava_custom_script_bgfixed(){
    ?>
    <script type="text/javascript">
    (function($) {
        function b() {
    		var ua 	     = navigator.userAgent,
    	    	ie 	 	 = new RegExp("IEMobile"),
    	        isMobile = ie.test(ua);
    
                    if(isMobile) {
                          $('.avia-bg-style-fixed').removeClass('avia-full-stretch');
                          $('.avia-bg-style-fixed').addClass('avia-ie-stretch');
                          $('.avia-bg-style-fixed').css('background-attachment', '');
                          $('.avia-bg-style-fixed').css('background-attachment', 'scroll');                                                      
    		}
        }
    
        b();
    })(jQuery);
    </script>
    <?php
    }

    And add this css code:

    .avia-ie-stretch {
    background-size: 100% 100% !important;
    }

    Cheers!
    Ismael

    #595087
    Anonymous

    Just as a tip, I found out is also possible to use this as a workaround within your custom javascript (should be placed within a jQuery document ready block):

        var deviceAgent = navigator.userAgent.toLowerCase(),
             agentID = deviceAgent.match(/(windows phone|iemobile)/);
    
        if(agentID) {
            $(".av-parallax-inner").unwrap();
        }  

    Tested on lumia 640, seems to work. It removes the parallax element but keeps the image.

    #596138

    Hey!

    @CreativeSolvers: Thanks for sharing! However, I actually tested that browser detection script before but it didn’t work on Google Chrome’s Nokia Lumia 520 emulation. Maybe, there’s something missing on the script or the emulation is not using the correct user agent. :)

    Regards,
    Ismael

    #597737

    Hi guys – sorry to report that neither of these make any difference to fixed bg issue. Have left the second option in place on the demo site for you reference and code in use below (in case I’ve made an error as my php is rudimentary).

    functions.php now looks like this:

    <?php
    
    // windows phone background fix
    add_action('wp_footer', 'ava_windows_fix');
    function ava_windows_fix(){
    ?>
    <script type="text/javascript">
    (function($) {
        function a() {
    		var ua 	     = navigator.userAgent,
    	    	ie 	 	 = new RegExp("IEMobile"),
    	        isMobile = ie.test(ua);
    
            if(isMobile && $('.avia-section .av-parallax').length >= 1) {
                $('.avia-section').each(function() {
                    var section  = $(this),
                        parallax = section.find('.av-parallax-inner'),
                        pbg      = $(parallax).attr('style').split(';'),
                        bg       = ''.
                        bgurl    = '';
    
                    if($(parallax).length != 1) return;
    
                    $(pbg).each(function(key, value) {
                        if(value.indexOf('background-image') != -1) {
                            bg = value;
                        }
                    });
    
                    bgurl = bg.split(' ');
    
                    $(bgurl).each(function(key, value) {
                        if(value.indexOf('url') != -1) {
                            bgurl = value;
                        }
                    });
    
                    $(this).find('.av-parallax').remove();
                    $(this).removeAttr('style');
                    $(this).css({
                        "background-image" : bgurl,
                        "background-attachment" : "scroll",
                        "background-position" : "center center"
                    });
                });
            }
        }
    
        a();
    })(jQuery);
    </script>
    
    <?php
    }
    
    // windows phone fixed background fix
    add_action('wp_footer', 'ava_custom_script_bgfixed');
    function ava_custom_script_bgfixed(){
    ?>
    <script type="text/javascript">
    (function($) {
        function b() {
    		var ua 	     = navigator.userAgent,
    	    	ie 	 	 = new RegExp("IEMobile"),
    	        isMobile = ie.test(ua);
    
                    if(isMobile) {
                          $('.avia-bg-style-fixed').removeClass('avia-full-stretch');
                          $('.avia-bg-style-fixed').addClass('avia-ie-stretch');
                          $('.avia-bg-style-fixed').css('background-attachment', '');
                          $('.avia-bg-style-fixed').css('background-attachment', 'scroll');                                                      
    		}
        }
    
        b();
    })(jQuery);
    </script>
    <?php
    }
    

    And style.css like this:

    /*
    Theme Name: Enfold Child
    Description: A <a href='http://codex.wordpress.org/Child_Themes'>Child Theme</a> for the Enfold WordPress Theme. If you plan to do a lot of file modifications we recommend to use this Theme instead of the original Theme. Updating wil be much easier then.
    Version: 1.0
    Author: Kriesi
    Author URI: http://kriesi.at
    Template: enfold
    */
    
    /*Add your own styles here:*/
    
    .avia-ie-stretch {
    background-size: 100% 100% !important;
    }
    #599377

    Hey!

    This is what it looked like when I checked it on an emulation. Screenshot: http://imgur.com/nrSc7i1

    I’ll ask Kriesi to check this but it may take a while before he can respond.

    Cheers!
    Ismael

    #600338

    Hey Ismael – yup, no browser based emulator I’ve tried will reproduce the issue (though Browserstack will).

    Also have not great news on the parallax fix – it works if there is only one section with a parallax background on a page but if there is another it doesn’t (same issue, second parallax background fills screen). Sigh – so close.

    Thanks, M

    #602597

    Hi!

    Can you please update Enfold to the latest version 3.5.1 – http://kriesi.at/documentation/enfold/updating-your-theme-files/ and check if that helps?

    Regards,
    Yigit

    #602598

    Subsequently addressed in other thread – all now resolved. Thanks.

Viewing 14 posts - 31 through 44 (of 44 total)
  • The topic ‘Issue with Enfold one-page restaurant demo on mobile’ is closed to new replies.