본문 바로가기
jquery

mouseenter animation + css z-index

by 바나냥 2020. 6. 25.
$(document).ready(function(){
	$("#introWrap a").each(function(){
		$(this).on("mouseenter", function() {
			$(this).css("z-index","2");
			$(this).stop(true).animate({width:"100%"}, 500);
		}).on("mouseleave", function() {
			$(this).stop(true).animate({width:"50%"}, 500)
			.queue(function(){
				$(this).css("z-index","1")
			});
		})
	});
})

댓글