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
<div class="capture" contenteditable> | |
<p>Capture with right click</p> | |
</div> | |
<script src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script> | |
<script> | |
const elementToSave = document.querySelector(".capture"); | |
// Download with right click | |
document.addEventListener("contextmenu", () => { | |
html2canvas(elementToSave).then(canvas => { |
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
/** | |
* Smooth scroll animation | |
* @param {int} endX: destination x coordinate | |
* @param {int} endY: destination y coordinate | |
* @param {int} duration: animation duration in ms | |
*/ | |
function smoothScrollTo(endX, endY, duration) { | |
const startX = window.scrollX || window.pageXOffset; | |
const startY = window.scrollY || window.pageYOffset; | |
const distanceX = endX - startX; |
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
defaults write com.apple.dock expose-animation-duration -float 0.1 ; killall Dock | |
defaults delete com.apple.dock expose-animation-duration ; killall Dock |
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
find . -name '*.DS_Store' -type f -delete |
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
$(document).ready(function(){ | |
$('.servicos__item').each(function(){ | |
var highestBox = 0; | |
$('.servicos__item__coluna', this).each(function(){ | |
if($(this).height() > highestBox) | |
highestBox = $(this).height(); | |
}); | |
$('.servicos__item__info',this).height(highestBox); | |
}); | |
}); |
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
$(document).scroll(function() { | |
if( $(this).scrollTop() > 100 ) { | |
$(".header-fixed").addClass("header-small"); | |
} else if( $(this).scrollTop() < 100 ) { | |
$(".header-fixed").removeClass("header-small"); | |
} | |
}); |
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() { | |
$(".projetos__lista-img > li:first-child > a").addClass("active"); | |
$(".projetos__lista-img > li > a").hover(function(e) { | |
$(this).parent().parent().find("li > a").removeClass("active"); | |
e.preventDefault(); | |
$(this).addClass("active"); | |
var linkImagem = $(this).attr("href"); | |
var $imagemFinal = $(this).parent().parent().parent().parent(); | |
$($imagemFinal).find(".projetos__img img").attr("src",linkImagem); | |
}); |
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() { | |
$('dd').hide(); | |
$('dt').each(function() { | |
$(this).show(0).on('click', function(e) { | |
e.preventDefault(); | |
$(this).toggleClass('active'); | |
$(this).next('dd').slideToggle(); | |
}); | |
}); | |
}); |
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
<?php | |
/* | |
* Resize images dynamically using wp built in functions | |
* Victor Teixeira | |
* | |
* php 5.2+ | |
* | |
* Exemplo de uso: | |
* | |
* <?php |
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
$(document).ready(function() { | |
$('.main__ideal').waypoint(function() { | |
$('.main__ideal ul li').each(function(d){ | |
$(this).delay(d * 150).fadeTo('slow', 1); | |
}); | |
}, | |
{ | |
offset: '80%' | |
}); | |
NewerOlder