Skip to content

Instantly share code, notes, and snippets.

Avatar

Carlos Moreira carmoreira

View GitHub Profile
@carmoreira
carmoreira / distictsCzechiaLow.json
Last active March 8, 2023 16:17
Czech Republic / Czechia map for Interactive Geo Maps WordPress plugin
View distictsCzechiaLow.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carmoreira
carmoreira / script.js
Created February 27, 2023 23:12
Make overlay entries list interact with base map - Interactive Geo Maps
View script.js
document.querySelectorAll('.igm_entries_list')
.forEach(function(list) {
list.setAttribute('data-map-id','3492969'); // change to your base map ID
var clone = list.cloneNode(true);
iMapsActions.buildLists(clone);
list.replaceWith(clone);
});
@carmoreira
carmoreira / style.css
Created January 26, 2023 15:38
Hide zoom controls on desktop - interactive geo maps
View style.css
@media only screen and (min-width:780px) {
.imapsZoomControl-group { display:none; }
}
@carmoreira
carmoreira / style.css
Created January 20, 2023 22:59
Fix lightbox causing page to jump to top - Interactive Geo Maps
View style.css
html, body {
height: initial !important;
}
/* to override height:100% which caused the issue */
@carmoreira
carmoreira / filter.js
Created January 19, 2023 23:39
Testomonials Showcsase hashtag filter select
View filter.js
jQuery(document).ready(function(){
var thishash = window.location.href.slice(window.location.href.indexOf('#') + 1);
var menuitem = 'ul#tts-filter-nav li:contains("'+thishash+'")';
if(thishash.length && menuitem.length){
jQuery(menuitem).click();
}
});
@carmoreira
carmoreira / style.css
Created January 4, 2023 11:21
Advisor quiz - answer commentary with color code for correct or incorrect answers
View style.css
/* Incorrect */
.advq_question_container:has(li.quiz_incorrect_answer) .advq_answer_commentary { background:red !important; color:#fff !important; }
/* Correct */
.advq_question_container:has(li.quiz_correct_answer) .advq_answer_commentary { background:green !important; color:#fff !important; }
@carmoreira
carmoreira / globals.js
Last active December 27, 2022 14:35
Global variables to alter behaviour on Interactive Geo Maps
View globals.js
/*
* Zoom Level for Markers on Click with Zoom on Click enabled
* if you do not override the value, it will default to zoom to
* the value double of the current zoom.
*/
let igmMarkerZoomLevelOnClick = 32;
/*
* Opacity for base region series when drilldown or show specific map action is perfomed
*/
@carmoreira
carmoreira / quebec_regions.geojson
Last active December 12, 2022 00:55
Quebec Regions in GeoJson
View quebec_regions.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carmoreira
carmoreira / style.css
Last active November 29, 2022 11:20
Full height map css hack - Interactive Geo Maps
View style.css
.map_wrapper .map_aspect_ratio {
padding-top: 0 !important;
height: calc(100vh) !important;
max-height: calc(100vh) !important;
}
/* If you only want it on smaller screens */
@media only screen and (max-width: 768px) {
@carmoreira
carmoreira / styles.css
Created November 28, 2022 23:10
pulsating markers effect with css - interactive geo maps
View styles.css
.imapsCircle {
paint-order: stroke;
stroke-opacity:1;
stroke: #dd9933; /* change with the stroke color you want */
animation: pulse-me 1s linear infinite;
}
@keyframes pulse-me {
0% {