Below you can find a 20 minute screencast will help you grasp jQuery easing while creating a simple animation. Using JavaScript eliminates having to do this using flash or an animated gif. No need to open up that flash program just to change the text, or need to make a whole new gif animation. JavaScript provides all the tools you need to create a superb text animation!
The following is all that is needed to perform a neat jquery easing text animation:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script>
<script type="text/javascript" src="http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js"></script>
<script type="text/javascript">
$(function(){
// make sure your h2's have a position relative
$('h2').css({left:'600px'})
jQuery.easing.def = 'easeOutBounce';
setTimeout(animate, 3600);
});
function animate()
{
$('h2').animate({left:0}, 1000);
}
</script>
This would of course ease your text in, but it would still be visible all on the far left. To fix this you need to wrap this in a div and assign the following properties to it:
div
{
overflow: hidden;
position: relative; /* ie 6 */
height: 100%; /* ie 6 */
}
If you want to find out more, check out a more detailed documentation of jquery easing plug-in.
February 1st, 2009 at 10:37 am
Could you please have a mirror for your screencasts? It seems that I don’t have access to blip.tv
I really appreciate it.
Thanks.
Nice tutorial. It’s a great use of jQuery that adds an interactive touch to the site which could before only be seen in flash animations or flash sites.
February 2nd, 2009 at 11:25 pm
i am already using jQuery and its really amazing… I designed many plug-ins for my site…this is really awesome..
Great tutorial, thanks for sharing!
Nice tut.
Thx.
Sarfraz
http://www.greepit.com | Open Source Resources for Designers & Developers
I spent too much time and traffic to view your video. It is unacceptable
[...] Animate text with jQuery easing [...]
[...] Animate Text with jQuery Easing [...]
Thanks a lot for this screencast. Throw away flash for making basic animation, Jquery rules…
good job
September 29th, 2009 at 12:24 am
Great tutorial. Definitely its useful.
Nice Tutorial. I used it but I also am using the following slider script and it makes the slider have the easing effect as well. How can I prevent this?
http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider
Ok, I think I’ve figured out the culprit.
It seems this line:
jQuery.easing.def = ‘easeOutBounce’;
is setting the default easing, so that all my animations move the same way.
How do I change this so that the easing is for this particular image only.
Please help, somebody…
November 19th, 2009 at 1:38 pm
I enjoyed this. Will consider using in the future.
Something i am looking for.
Twitter
Follow me on Twitter to keep up to date!
RSS Feed
Keep up with all of our updates by subscribing to our RSS feed!
FaceBook
Join our group on Facebook and become a fan of us!