View bootstrap-4-sass-mixins-cheat-sheet.scss
/* -------------------------------------------------------------------------- */ | |
// All Bootstrap 4 Sass Mixins [Cheat sheet] | |
// Updated to Bootstrap v4.1.x | |
// @author https://anschaef.de | |
// @see https://github.com/twbs/bootstrap/tree/v4-dev/scss/mixins | |
/* -------------------------------------------------------------------------- */ | |
// Grid variables | |
$grid-columns: 12 !default; | |
$grid-gutter-width: 30px !default; |
View detectIphoneX.js
(function($){ | |
"use strict"; | |
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; | |
// Get the device pixel ratio | |
var ratio = window.devicePixelRatio || 1; | |
// Define the users device screen dimensions | |
var screen = { |
View detectSafari.js
(function($){ | |
"use strict"; | |
if ( /^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { | |
$("html").addClass("safari-detected"); | |
} | |
})(jQuery); |
View font-smoothing-on-high-dpi-media.css
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
View high-dpi-media.css
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
View js
fixColHeight = function () { | |
if ($('.page-search.page-search-node').length) { | |
var $container = $(".node-search-results"); | |
var $cols = $container.find(".row > div").detach(); | |
$container.empty(); | |
for(var i = 0; i < $cols.length; i++) { | |
if (i % 3 == 0) { | |
$container.append($("<div>").addClass("row")); | |
} | |
$container.find(".row").last().append($cols.eq(i)); |
View ie67891011-css-hacks.txt
IE6 Only | |
================== | |
_selector {...} | |
IE6 & IE7 | |
================== | |
*html or { _property: } | |
IE7 Only | |
================== |
View js
// Animate the scroll to top. | |
$('.go-top').click(function (event) { | |
event.preventDefault(); | |
$('html, body').animate({scrollTop: 0}, 300); | |
}) |
View js
$(window).scroll(function () { | |
if ($(this).scrollTop() > 200) { | |
$('.go-top').fadeIn(200); | |
} else { | |
$('.go-top').fadeOut(200); | |
} | |
}); |
View js
// desactivate call option in non mobile device | |
$(document).on('click', '[href^="tel:"]', function(e){ | |
if( !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
} | |
}); |
NewerOlder