Reputation: 54
I have done absolutely everything to try and fix my code: JQuery libraries (Ui’s, Core’s, Plugins) .etc, but can't fix this
$('.heading').click(function() {
console.log("Clicked", $(this));
$(this).animate({'color':'blue'},500,'easeOutBounce'); // example 1 , there not work and attempt error
// $(this).animate({'color':'blue'},500,'leaner'); // example 2 , there not work BUT NOT attempt error
});
});
There is link for see console errors
Upvotes: 1
Views: 2646
Reputation: 9673
Include the latest jQueryUI for the easing options.
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js'></script>
$(document).ready(function() {
$('.heading').click(function() {
$(this).animate({'color':'blue'},1000,'easeOutBounce');
$(this).css({ transition: "transform 0.5s",
transform:"translate(100px,100px)"});
});
});
.heading{
color: green;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js'></script>
<h1 class="heading">Epanalepis de Fato Hominis</h1>
Upvotes: 2