-
AuthorPosts
-
March 1, 2016 at 4:52 pm #591658
Recovered code from backup, thanks.
- This reply was modified 8 years, 8 months ago by M1000000.
March 1, 2016 at 5:02 pm #591674Hey!
I asked Ismael to check the thread. Please kindly wait to hear from him
Regards,
YigitMarch 1, 2016 at 5:33 pm #591707Afraid fixed background still has same bug with new code in place :(
March 2, 2016 at 10:39 am #591995Hi!
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!
IsmaelMarch 2, 2016 at 6:01 pm #592229None 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.
March 6, 2016 at 11:06 pm #594018Hi Guys – was this what you wanted? Any updates?
Thanks.
March 8, 2016 at 8:11 am #594865Hey!
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!
IsmaelMarch 8, 2016 at 5:50 pm #595087AnonymousJust 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.
March 10, 2016 at 8:30 am #596138Hey!
@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,
IsmaelMarch 14, 2016 at 2:36 pm #597737Hi 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; }
March 17, 2016 at 3:31 am #599377Hey!
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!
IsmaelMarch 18, 2016 at 3:41 pm #600338Hey 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
March 23, 2016 at 4:17 pm #602597Hi!
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,
YigitMarch 23, 2016 at 4:18 pm #602598Subsequently addressed in other thread – all now resolved. Thanks.
-
AuthorPosts
- The topic ‘Issue with Enfold one-page restaurant demo on mobile’ is closed to new replies.