Not working on mobile | WordPress.org

[ad_1]

I suspect this is something to do with your theme or plugins. If you look at the developer console there’s a jQuery error in another part of your code, which will cause JavaScript to stop executing. If that happens before your map display completes then you’ll only get part of it. Map tiles are drawn at one of the later stages.

Or maybe something to do with your caching options? Most of the JS is marked as deferred, but there is an inline chunk which is not and maybe depends on being executed after the deferred part?

Thanks for the prompt reply. I can see that in the console. I shall investigate further.

Thanks again for taking a look.

OK so I was deferring jQuery for performance reasons (at some point). I have now removed the ‘defer’, console isn’t showing any errors but I’m still not getting the map display on mobile?

OK, the JS error was a red herring. It’s the CSS in Themify.

@media only screen and (max-width: 800px) {
  img {
    width:100%!important;
  }
}

The map and markers disappear when the width is 800px or less.

Forcing image width to 100% of the parent item irrespective of where the image is coming from seems like questionable programming practice.

I think you’ll have to take this up with Themify

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer