a
태그를 애니메이션화하려고하는데, 찾고있는 효과를 얻기 위해 table-cell
의 CSS 속성이 있습니다. 누군가 jQuery를 사용하여 그것을 클릭 할 때 움직이기를 원하지만 작동하지 않습니다. table-cell
때문에 발생한다고 생각하지만 table-cell
을 제거하면 레이아웃이 손상됩니다. Here is the page I am working with. http://jsfiddle.net/nEryb/ 여기jQuery 애니메이션 표 셀
.clip{
background-color: #373938;
min-height: 100%;
height: 100%;
width: 300px;
background-position: center center;
background-size: auto 100%;
background-repeat: no-repeat;
display: table-cell;
box-shadow: -2px 0 5px rgba(0,0,0,.2), -2px -2px 5px rgba(0,0,0,.2), -2px 2px 5px rgba(0,0,0,.2);
text-align: center;
filter: grayscale(100%);
filter: url(/media/images/new/filters.svg#grayscale);
filter: gray;
-webkit-filter: grayscale(1);
position: relative;
}
가 JQuery와입니다 : 여기
는 바이올린입니다$(document).on("click", "a.clip", function(e){
e.preventDefault();
window.history.pushState("Gallery", "Gallery", $(this).attr("href"));
$("a.clip.hover").animate({
height: "20px"
}, "fast");
});
나는 이것이 작동하도록하기 위해 무엇을 할 수 있는가?
$ ('. clip')으로 시작하십시오. ('click', function() {}); – Chad