Skip to content

Instantly share code, notes, and snippets.

@carmoreira
carmoreira / gradientlogos.css
Created July 16, 2024 14:20
Gradient on the sides of the logos showcase carousel
.lshowcase-logos .bx-wrapper .bx-viewport::before,
.lshowcase-logos .bx-wrapper .bx-viewport::after {
content: '';
position: absolute;
top: 0;
bottom: 0;
width: 100px; /* Adjust the width as needed */
z-index:999;
}
@carmoreira
carmoreira / tooltip.js
Created December 27, 2023 10:50
Change all tooltips orientation in Interactive Geo Maps
// replace with your map ID and region code.
let mapID = 21148;
let mapContainer = document.getElementById('map_' + mapID);
mapContainer.addEventListener('mapready',function(ev){
iMaps.maps[mapID].series.forEach(function(ser){
ser.tooltip.ignoreBounds = true;
ser.tooltip.pointerOrientation = 'left'; // "horizontal", "vertical", "up", "down", "right", or "left"
});
});
@carmoreira
carmoreira / hide.js
Created July 7, 2023 11:33
Hide Markers until specific zoom level is reached - Interactive Geo Maps
let mapID = 955; // replace with your map ID
let zoomLevel = 3; // replace with the zoom level you want to show the labels at
let igmNow = Date.now();
function igmHideMarkers(igmap) {
igmNow = Date.now();
let series = iMaps.maps[mapID].series;
series.forEach(function(serie) {
if (typeof serie.mapImages === 'undefined') {
return;
@carmoreira
carmoreira / script.js
Created February 27, 2023 23:12
Make overlay entries list interact with base map - Interactive Geo Maps
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
@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
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
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
/* 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 / styles.css
Last active March 24, 2023 13:12
pulsating markers effect with css - interactive geo maps
.imapsCircle {
paint-order: stroke;
stroke-opacity:1;
stroke: #dd9933; /* change with the stroke color you want */
animation: pulse-me 1s linear infinite;
}
/* or target by colour */
.imapsCircle-group[fill="#1e73be"] .imapsCircle {
@carmoreira
carmoreira / front.php
Created July 18, 2022 10:04
Add more share button to Advisor Quiz WordPress plugin
// Replace this function in your front.php to give customers more share buttons.
function advq_get_after_results_content($id,$data,$options) {
$html = '';
if(isset($data['code_after_results']) && $data['code_after_results'] != ''){
$html .= '<div class="advq_integration_after_results">';
if( $options['render_shortcodes_integration'] ){