1
애니메이션을 실행 한 후 링크를 따라 코드를 작성하려고합니다.jQuery - .animate 후 연결
아이디어는 "Gnoll"이 버튼을 눌렀다 고해서 링크로 연결된다는 것입니다.
그것은 그 안에없는 링크가 있습니다
이 지금까지 내 코드입니다.
은
$(document).ready(function(){
$('.Homebutton').click(function(){
$('.animateme').html('<img src="Construct2/Images/Gnoll_Running.gif" />');
$('.animateme').animate({
left: '+=150',
}, 800, function() {
$('.animateme').html('<img src="Construct2/Images/Gnoll_Hit.gif" />');
});
$('.animateme').animate({
left: '+=0',
}, 500);
$('.animateme').animate({
left: '+=0',
}, 500, function() {
$('.animateme') .html('<img src="Construct2/Images/Gnoll_Resting_smaller.gif" />');
});
});
$('#AddOnbutton').click(function(){
$('.animateme').html('<img src="Construct2/Images/Gnoll_Running.gif" />');
$('.animateme').animate({
left: '+=250',
}, 1000, function() {
$('.animateme').html('<img src="Construct2/Images/Gnoll_Hit.gif" />')
});
$('.animateme').animate({
left: '+=0',
}, 1000, function() {
$('.animateme') .html('<img src="Construct2/Images/Gnoll_Resting_smaller.gif" />');
$("#AddOnbutton").html('<img src="Construct2/Images/redbutton.png" />');
});
});
});
코드는 아주 기본이고 당신이 볼 수있는 (또한, 버튼의 색상은 "히트"애니메이션. 지금까지 나는 그 일에 실패를 통해 중간에 대해 변경할 예정이다) . 링크 마지막
$('.animateme') .html('<img src="Construct2/Images/Gnoll_Resting_smaller.gif" />');