At http://wanders.com/dealers/ we're using a WordPress plugin 'Simple Locator'. We've added a dropdown for selecting a country and filtering the posts. The filter is working, but the dropdown must be hidden until the map is visible.
How to do this in the right way with Jquery?
At this point we use this (minified):
$(".wpsl-map").is(":visible")?$(".country").show("slow"):$(".country").hide("slow");
The div .country is hiding, but isn't showing when the map has loaded.
Thanks in advance!
While the map is loading, the div containing the spinning loader gif has this css classes:
After the map is loaded, I believe the .loading class will be removed, thus:
So in your jQuery, add an event listener for the .wpsl-results.loading class.