Skip to content

Instantly share code, notes, and snippets.

Noël Strongground

Block or report user

Report or block Strongground

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Strongground
Strongground / debugging.htm
Created Jan 15, 2019
Universal Debugging Styles
View debugging.htm
<style>
.debug {
position:fixed;
bottom:0;
left:0;
z-index:99999999;
width:100%;
min-height:25px;
line-height:25px;
background:#ef4f2f;
@Strongground
Strongground / defer.js
Created Feb 14, 2019
Defer method to deferred loading of any method requiring jQuery on root level of webpages
View defer.js
function defer(method) {
if (window.jQuery) {
if (jQuery.countdown) {
method();
}
} else {
setTimeout(function() { defer(method) }, 50);
}
}
@Strongground
Strongground / recommendation_mutation_observer.js
Created Jan 8, 2019
SFCC: Mutation Observer for Recommendation slots
View recommendation_mutation_observer.js
/**
* Setup Mutation Observers for Recommendations Slots
* When recommendations markup is loaded, fire off Mutation Observer callback
* - Init Product Tile Carousel on Recommendation Product Tiles
*/
function initRecommendations() {
var observer = new MutationObserver(function(mutations, observer) {
var $this = $(mutations[0].target);
// This is the logic to ensure that initProductTileCarousel()
You can’t perform that action at this time.