Skip to content

Instantly share code, notes, and snippets.

@origamid
Last active December 27, 2015 16:19
Show Gist options
  • Save origamid/7354147 to your computer and use it in GitHub Desktop.
Save origamid/7354147 to your computer and use it in GitHub Desktop.
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', '');
$(this).parent().attr('id', 'ativado');
$(this).css('display', 'block');
$("div.portfolio__item").stop();
$("div.portfolio__item." + $classe).stop();
$("div.portfolio__item").slideUp(400).delay(600);
$("div.portfolio__item." + $classe).slideDown(600);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment