Skip to content

Instantly share code, notes, and snippets.

@DylanCodeCabin
Created January 17, 2023 06:01
Show Gist options
  • Save DylanCodeCabin/a4c3663dfce57b0dabced19c5311ce5f to your computer and use it in GitHub Desktop.
Save DylanCodeCabin/a4c3663dfce57b0dabced19c5311ce5f to your computer and use it in GitHub Desktop.
jQuery(function($){
/* Clone the original method */
WPGMZA.ProInfoWindow.prototype._populatePanel = WPGMZA.ProInfoWindow.prototype.populatePanel;
WPGMZA.ProInfoWindow.prototype.populatePanel = function(){
/* Call the original method */
this._populatePanel();
/* Grab a self refernce, to be used in our loop */
const self = this;
$('.wpgmza-panel-info-window[data-map="' + this.feature.map.id + '"]').each(function(){
/* Loop through each map and it's respective panel listing */
/* For the sake of example, we will just hide the address, but really this could be any logic you might want */
$(this).find('.wpgmza-address').hide();
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment