Skip to content

Instantly share code, notes, and snippets.

View alfredk's full-sized avatar

Alfred Kolowrat alfredk

View GitHub Profile
@alfredk
alfredk / pages.js
Created February 4, 2025 00:33 — forked from alechko/pages.js
Console log clicked event
$(document).click(function(e){
var clickElement = e.target; // get the dom element clicked.
var elementClassName = e.target.className; // get the classname of the element clicked
console.log(e);
});
@alfredk
alfredk / bootstrap-3-carousel-fade-in-fade-out.markdown
Created March 26, 2020 23:42
Bootstrap 3 carousel fade-in, fade-out
@alfredk
alfredk / gist:387f449c41323ec442d0d21b5b09a665
Created August 31, 2017 23:08 — forked from bradwestfall/gist:f5a010e96fb0c4d18556
Pull Instagram Images via JavaScript
var mediaQuery = window.matchMedia('(max-width: 1024px)');
var mediaQuery = window.matchMedia('(max-width: 1024px)');
// Add a listen event
mediaQuery.addListener(onDetectMobile);
// Function to do something with the media query
function onDetectMobile(mediaQuery) {
if (mediaQuery.matches) {
mobileMenu.init()
} else {
@alfredk
alfredk / Gruntfile.js
Created June 23, 2014 23:38
Gruntjs starter for _underscores Wordpress theme
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: ['Gruntfile.js', 'js/*.js',]
},
uglify: { // minify and concatenate .js files into one
dist: {