Skip to content

Instantly share code, notes, and snippets.

@origamid
Created March 13, 2014 21:34
Show Gist options
  • Save origamid/9537436 to your computer and use it in GitHub Desktop.
Save origamid/9537436 to your computer and use it in GitHub Desktop.
Galeria de Fotos
$(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);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment