-
AuthorPosts
-
November 2, 2015 at 10:12 am #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
November 3, 2015 at 3:43 pm #529346Hey 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,
AndyNovember 3, 2015 at 4:11 pm #529393Here you go:
November 4, 2015 at 3:23 am #529703Hey!
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,
IsmaelNovember 4, 2015 at 9:31 am #529804Well, 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!
November 4, 2015 at 9:39 am #529811We 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.
November 5, 2015 at 5:19 am #530502Hi!
Did it work for you? You can also try to change the condition to “$.avia_utilities.isMobile”.
Best regards,
IsmaelNovember 5, 2015 at 9:17 am #530602Hi There,
I don’t know anything about JavaScrip, just put one and one together. Where should I use “$.avia_utilities.isMobile”?
Thanks
November 5, 2015 at 11:11 am #530660Hey!
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,
IsmaelNovember 5, 2015 at 11:47 am #530696Hi 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
November 6, 2015 at 3:15 pm #531461Hi!
can you provide us a link showing the issue please? try to deactivate all plugins while testing.
Regards,
AndyNovember 6, 2015 at 6:24 pm #531615Here you go.
Thanks, T.
November 15, 2015 at 2:16 am #535979Hey!
Can you please turn that account into an Administrator?
Cheers!
JosueNovember 16, 2015 at 9:44 am #536397Sure, done.
Thanks, T.
November 18, 2015 at 8:57 am #537879Hi!
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,
IsmaelNovember 18, 2015 at 2:10 pm #538097Hi 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
November 21, 2015 at 6:30 am #540089Hey!
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,
IsmaelNovember 23, 2015 at 10:07 am #540595Hi 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.
November 24, 2015 at 7:04 am #541352Hi!
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,
IsmaelNovember 24, 2015 at 9:36 am #541390Hi There,
The change doesn’t work. We copied the page for testing.Thanks!
November 27, 2015 at 6:14 am #543474Hi!
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!
IsmaelNovember 30, 2015 at 10:22 am #544328Well, as we had a presentation to the client. We had to change to the original solution, when you checked.
December 1, 2015 at 3:35 am #544960Hey!
We modified the code a bit so that the color section container’s height is the same as the parent container.
Cheers!
IsmaelDecember 1, 2015 at 2:37 pm #545194Sorry, wich code did you modify and where?
Thanks, T.
December 1, 2015 at 3:15 pm #545248Hi!
I think Ismael is referring to the code he provided to you here. Check your functions.php.
Regards,
AndyDecember 2, 2015 at 4:28 pm #545943Hi There,
There is no such code in the functions.php. Would you mind posting the changes here?
Many Thanks, T.
December 4, 2015 at 2:31 pm #547013Hey!
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 -
AuthorPosts
- You must be logged in to reply to this topic.