Skip to content

Instantly share code, notes, and snippets.

@KaiserEMP
Created July 9, 2019 13:05
Show Gist options
  • Save KaiserEMP/dd692422041b83771d344bade5239eac to your computer and use it in GitHub Desktop.
Save KaiserEMP/dd692422041b83771d344bade5239eac to your computer and use it in GitHub Desktop.
var allImageLinks = $('a[href$=".jpg"]:not(.no-fancy),a[href$=".jpeg"]:not(.no-fancy),a[href$=".png"]:not(.no-fancy), .fancylink');
function initFancy(){
allImageLinks.fancybox({
});
}
initFancy();
var colorR = Math.floor((Math.random() * 256));
var colorG = Math.floor((Math.random() * 256));
var colorB = Math.floor((Math.random() * 256));
$('.container').css("background-color", "rgb(" + colorR + "," + colorG + "," + colorB + ")");
$(document).on('click', allImageLinks ,function(e){
e.preventDefault;
/* Init fancybox */
console.log(allImageLinks);
});
console.log('Im ready');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment