-
AuthorPosts
-
September 12, 2018 at 4:33 pm #1009007
Hi,
I’m sorry to be re-opening this issue, but I got assistance from you guys on a site I was working on that was having problems with using the ajax portfolio inside of a tab panel. Here’s the thread:
https://kriesi.at/support/topic/expanding-content-hidden-in-tab-views
I have a new site that I am working on that is a clone of the previous one. I copied the child theme from the site you guys fixed over to the new site, and verified that the functions.php file in each site matched. However the fix doesn’t appear to be working on the new site. You can see what I mean if you go to http://lapalmera.wpengine.com/shop-dine (hosted on WPengine) and click on . the Specialty Food tab. If you click any of the logos in that tab, the ajax panel loads, but the tab panel doesn’t resize to display the content. I read back over the documentation, and retraced my steps, but I can’t find a reason why this is working on one site and not the other when they are both using the same theme files. Can you please help me to resolve?
Sorry for opening the new thread, but the previous thread is closed. If you need login information I can provide it.
Thanks!
September 13, 2018 at 2:14 pm #1009402Hey sassoagency,
Yes please create us an admin account and we’ll look into it.
Best regards,
PeterSeptember 13, 2018 at 6:51 pm #1009592Hi Peter,
I’ve added an account. The details are in the private content.
Thanks!
September 15, 2018 at 9:25 am #1010042Hi,
I added this code to the child theme functions.php to fix the issue:
add_action('wp_footer', 'ava_auto_resize_dude'); function ava_auto_resize_dude(){ ?> <script> (function($){ var int = window.setInterval(function(){ $(window).trigger('resize'); $(window).trigger('av-content-el-height-changed'); }, 1000); })(jQuery); </script> <?php }
Please note you need to wait some seconds (2-3 seconds) until you click on an item. Otherwise the ajax portfolio data is not initialized and this can break the portfolio. You can activate the preloader effect (Enfold > Theme Options) if you want to make sure that your users can’t click on an item before the page content is loaded.
Best regards,
PeterSeptember 17, 2018 at 5:18 pm #1010848Hi Peter,
Thanks for looking into this. Unfortunately, the fix seems to have broken the portfolio. I tried turning on the preload feature to see if that is the issue as well, but it wasn’t. Now, if you go to the page and click the Specialty Foods tab, it displays the logos, but if you click on a logo to view the info for that tenant the ajax portfolio piece doesn’t load. It only seems to be happening in this tab.
Thanks
September 18, 2018 at 9:36 am #1011161Hi,
We adjusted the code a bit. Please test it a few times.
add_action('wp_footer', 'ava_auto_resize'); function ava_auto_resize(){ ?> <script> (function($){ $('.grid-sort-container').on('click', '.grid-entry', function() { setTimeout( function() { console.log('resize'); $(window).trigger('av-content-el-height-changed'); }, 1500); }); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_auto_resize_dude'); function ava_auto_resize_dude(){ ?> <script> (function($){ var int = window.setInterval(function(){ console.log('tick'); $(window).trigger('resize'); $(window).trigger('av-content-el-height-changed'); }, 1000); $(window).on('load', function() { clearInterval(int); }); })(jQuery); </script> <?php }
Best regards,
IsmaelSeptember 18, 2018 at 4:42 pm #1011382Hi Ismael,
Thanks for looking into this. This fix seems to have taken care of the issue. Thanks again!
September 18, 2018 at 5:43 pm #1011424Hi sassoagency,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.