$("document").ready(function(){
$(this).css("position", "relative");
$(this).click(function(){
$("img").animate({top: 500}, 2000, "easeInQuad", function(alert("DONE!");){});
});
});
Ten kod daje mi błąd Uncaught TypeError: jQuery.easing[this.easing] is not a function
. Nie wiem, co się dzieje.
Odpowiedzi:
2 dla odpowiedzi № 1Znajduję dwa błędy.
1) Zmień
$("document")
przez
$(document)
2) Atrybutem jest jqueryui easeInQuad (https://jqueryui.com/easing/). Dodaj bibliotekę jqueryui
1 dla odpowiedzi nr 2
Błąd składni. To musi być
function() { alert("DONE!"); }