Skip to content

Instantly share code, notes, and snippets.

View origamid's full-sized avatar

André origamid

View GitHub Profile
@origamid
origamid / gist:7354175
Last active December 27, 2015 16:19
JS: Visibility
Visibility.onVisible(function(){
var header = $('header'),
home = $('.home'),
homeH1 = $('.home h1'),
homeBlockquote = $('.home blockquote'),
homeButton = $('.home .origamid-button'),
mainH2 = $('main h2'),
child1 = $('main ul li.origami:nth-child(1)'),
child2 = $('main ul li.origami:nth-child(2)'),
@origamid
origamid / gist:7354156
Last active December 27, 2015 16:19
JS: Ajax Form
$('form.contato__form').on('submit', function() {
var that = $(this),
url = that.attr('action'),
type = that.attr('method'),
data = {};
that.find('[name]').each(function(index, value) {
var that = $(this),
name = that.attr('name'),
value = that.val();
@origamid
origamid / gist:7354147
Last active December 27, 2015 16:19
JS: Hide - SlideDown
$(function() {
$("div.portfolio__item").hide();
$("div.portfolio__item.espmjr").slideDown();
$("a.espmjr").parent().attr('id', 'ativado');
$('.clientes > li > a').each(function() {
$(this).css('display', 'block');
$(this).show(0).on('click', function(e) {
e.preventDefault();
$classe = $(this).attr('class');
$('ul.clientes > li').attr('id', '');
@origamid
origamid / gist:7354118
Created November 7, 2013 12:52
JS: ScrollTop
$(".logo").click(function(e) {
e.preventDefault();
$('html, body').animate({
scrollTop: $("#home").offset().top
}, 1000);
});
@origamid
origamid / dabblet.css
Created January 14, 2012 23:52
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/