0

I want to make an text animation with JQuery but I dont know how should i start and how should i code this. Actually what/where to google it.

If you look at http://www.apple.com/stevejobs/ you see that text are moving and the last is added to the top with nice fadeout and so on. Could you help me to give an example/ scratch of doing it in JQuery Ajax and html.

I want to implement it in Python as backend and in the front use Ajax ,JQuery, Javascript and so on. please give hint that which one is better.

Thank you

Emax
  • 1,007
  • 2
  • 13
  • 16

2 Answers2

3
  1. Put text in <div>s
  2. Use jQuery's effects to show, hide, and animate the text.
  3. Optionally add jQuery UI's easing effects and use something like the easeInOutCubic easing function.
a paid nerd
  • 30,702
  • 30
  • 134
  • 179
0

This should get you started atleast with the effect.

<!DOCTYPE html>
<html>
<head>
  <style>
div { background:#de9a44; margin:3px; width:80px; 
height:40px;  }
#one { background:#de9a44; margin:3px; width:80px; 
height:40px; display:none;  }
</style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<div id="one"></div>
<div></div>
<div></div>
<script>
    //sets a timer to 1sec
$(document).ready(function () {
    window.setInterval(yourfunction, 1000);
});

    //goes to a php file and return data to be appended to your div.
function yourfunction() {   
    $.get("test.php", function(data){
        $("#one").html(data)
        $("#one").slideDown("slow");

    });

}
</script>

</body>
</html>

timer thanks to Kristof Claes and here more info on the jquery get() function. My recommendation for you is to map out a logic of what you want to accomplish, and search for how it might be called and start forming piece by piece your result..That's what I do, I'm no expert in jquery but i have an idea and thanks to great people in in S.O. and google I am able to accomplish awesome things.

Community
  • 1
  • 1
Andres
  • 2,013
  • 6
  • 42
  • 67
  • Can you describe it with little text, how should i fill the one with data, which data model is better ? and how it works ? – Emax Dec 09 '11 at 15:57