Remove hint on hover | WordPress.org

[ad_1]

Hi @datacaixa,

Thank you for getting in touch, we do appreciate your time. Unfortunately, we do not currently have a setting for controlling the hover title functionality.

That is to say this is directly controlled by the Google Maps API, however, this can be disabled by adding Custom JavaScript to our settings area.

I have prepared a script which can be copied and pasted into our Custom JavaScript box, available under Maps > Settings > Custom Scripts (Or Advanced Settings depending on your internal build engine).

Please see the script below:

jQuery(function($){
  	$(document.body).on('markersplaced.wpgmza', () => {
      for(let m in WPGMZA.maps){
        for(let i in WPGMZA.maps[m].markers){
          const marker = WPGMZA.maps[m].markers[i];
          if(marker && marker.googleMarker){
            google.maps.event.addListener(marker.googleMarker, 'mouseover', function (e) {
              if(e && e.domEvent && e.domEvent.target){
                  try{
                    e.domEvent.target.removeAttribute('title');
                    e.domEvent.target.parentElement.removeAttribute('title');
                  } catch(ex) {}
              }
            });
          }
        }
      }
    });
});

I hope this helps.

OK, thank you @dylanauty!

 

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