This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Detect touch device | |
function is_touch_device() { | |
return !!('ontouchstart' in window) | |
|| !!('msmaxtouchpoints' in window.navigator); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta property="og:url" content="http://domain.com" /> | |
<meta property="og:image" content="http://domain.com/logo.png" /> | |
<meta property="og:type" content="article" /> | |
<meta property="og:title" content="Pagename" /> | |
<meta property="og:site_name" content="MyBrandname" /> | |
<meta property="og:description" content="Lorem ipsum dolor sic amet..." /> | |
<meta name="twitter:url" content="http://domain.com/login" /> | |
<meta name="twitter:description" content="Lorem ipsum dolor sic amet..." /> | |
<meta name="twitter:image" content="http://domain.com/logo.png" /> | |
<meta name="description" content="Lorem ipsum dolor sic amet..." /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#textinput').bind('input', function(e){ | |
if( $(this).val().length > 0 && !/^\s+$/.test($(this).val()) ){ | |
$('#submit').removeClass( 'disabled' ); | |
} else { | |
$('#submit').addClass( 'disabled' ); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-webkit-tap-highlight-color: rgba(0,0,0,0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function findDuplicateIds() { | |
var ids = {}; | |
var all = document.all || document.getElementsByTagName("*"); | |
for (var i = 0, l = all.length; i < l; i++) { | |
var id = all[i].id; | |
if (id) { | |
if (ids[id]) { | |
console.log("Duplicate id: #" + id); | |
} else { | |
ids[id] = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create 'Lavori' folder under media | |
cd /media | |
sudo mkdir Lavori | |
sudo chown ascarpello:ascarpello Lavori/ | |
sudo chmod 775 -R Lavori | |
# Edit fstab | |
sudo /etc/fstab | |
# and add following line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<video autoplay poster="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/polina.jpg" id="bgvid" loop> | |
<!-- WCAG general accessibility recommendation is that media such as background video play through only once. Loop turned on for the purposes of illustration; if removed, the end of the video will fade in the same way created by pressing the "Pause" button --> | |
<source src="//demosthenes.info/assets/videos/polina.webm" type="video/webm"> | |
<source src="//demosthenes.info/assets/videos/polina.mp4" type="video/mp4"> | |
</video> | |
<div id="polina"> | |
<h1>Polina</h1> | |
<p>filmed by Alexander Wagner 2011 | |
<p><a href="//demosthenes.info/blog/777/Create-Fullscreen-HTML5-Page-Background-Video">original article</a> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur porta dictum turpis, eu mollis justo gravida ac. Proin non eros blandit, rutrum est a, cursus quam. Nam ultricies, velit ac suscipit vehicula, turpis eros sollicitudin lacus, at convallis mauris magna non justo. Etiam et suscipit elit. Morbi eu o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// REPLACE IMG SVG TO INLINE SVG FOR OLD ANDROID | |
$('img[src*=".svg"]').each(function(){ | |
var $img = $(this); | |
var imgID = $img.attr('id'); | |
var imgClass = $img.attr('class'); | |
var imgURL = $img.attr('src'); | |
$.get(imgURL, function(data) { | |
// Get the SVG tag, ignore the rest | |
var $svg = $(data).find('svg'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input:-webkit-autofill { | |
-webkit-box-shadow: 0 0 0 1000px white inset; | |
-webkit-text-fill-color: #6e110d !important; | |
} |
OlderNewer