Plugin Author
Joe
(@morehawes)
Hi @jayrossouw,
Thanks for reaching out. I understand the issue and wrote some JavaScript that can be added to your site; it adjusts the Map when tabs are switched:
jQuery(document).on('ready', function() {
jQuery('.df_at_nav').on('click', function() {
setTimeout(function() {
var waymark_map = jQuery('.df_at_content_active .waymark-map');
if(waymark_map.length) {
var waymark_instance = waymark_map.data('Waymark');
if(typeof waymark_instance === 'object' && typeof waymark_instance.map === 'object') {
waymark_instance.map.invalidateSize();
waymark_instance.map.fitBounds(waymark_instance.map_data.getBounds());
}
}
}, '500');
});
});
Please do let me know if you have any further issues.
Cheers,
Joe
Hay Joe,
Thanks for the resposne. Sadly the Javascript isn’t working on my side. I think it might be due to Divi?
Hey Joe,
I just found the issue.
The java script does work on my site the only thing I needed to change was the first line: jQuery(document).on(‘ready’, function()
to: jQuery(document).ready(function() {
then it worked fine. Thanks so much!
Plugin Author
Joe
(@morehawes)
Hi @jayrossouw ,
Good catch – I’m glad that worked for you 🙂 Please do let me know if there is anything else I can assist with.
If you like the plugins reviews are greatly appreciated!
Cheers,
Joe