Created
May 18, 2017 22:03
-
-
Save adhoch/21f0d985057263e6713ef5c21f2b146a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$(".description-truncate").mouseenter(function() { | |
console.log('hit'); | |
tile = $(this).closest('.tile-container'); | |
if(!tile.hasClass('.tile-container-sketchpad')){ | |
clone = $(tile).clone(); | |
$(clone).attr("id",clone[0].id + "-clone"); // just in case we need this later, let's change the id | |
$(clone).addClass('tile-expand-clone'); | |
$(clone).find(".title").css({"color":"#ca062c"}); | |
$(clone).css({"position":"absolute"}); // important! position it absolute first! | |
$(clone).css($(tile).position()); // position the clone directly in front of the this tile | |
$(clone).bind("mouseleave", function() { // remove the clone on mouseLeave | |
$(this).remove(); | |
// $('.tile-expand-clone').remove(); | |
}) | |
$(".resource-list").append(clone); // add it the tiles | |
//$(clone).find(".description-full").animate({height: "100%"}, 250); | |
$(clone).css('height', "100%"); | |
x=$(clone).find('.tile-body').outerHeight(); | |
y=$(clone).find('.taxonomy').outerHeight(); | |
z=x+y; | |
$(clone).find(".description-full").css('height', "100%"); | |
$(clone).find(".description-full, .tile-body").css({height: z+'px'}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment