Loop Animation - Jquery

by Felipe Lambert 22. October 2009 10:49

A alguns dias programei por necessidade um loop de animação utlilizando Jquery,

venho compartilhar o script simples.

 

<title>Untitled 1</title>
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
      $(document).ready(function(){
         setTimeout("flashing()",300);       
    });
   
    function flashing()
    {
        $("#flash2").animate({"opacity":".0"},1000).animate({"opacity":"1"},1000);
        $("#mov1").animate({"left":"1000"},10000).animate({"left":"-100"},10000);
        setTimeout("flashing()",3000);
    }
</script>
<style type="text/css">
#flash {
    background-color: lime;
    height: 100px;
}
#flash2 {
    background-color: blue;
    height: 100px;
    margin-top: -100px;
    float: left;
    position: relative;
    width: 100%;
}
#mov1{
    height:50px;
    width:50px;
    background-color:green;
    color:white;
    position:relative;
    left:-100px;
}
body{
    font-family:"Segoe UI", Tahoma, Geneva, Verdana ;
}
</style>
</head>

<body>

<div id="flash">
    <span lang="pt-br">Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    Curabitur at dolor at orci dictum gravida. Phasellus a nulla at lorem consequat
    dignissim quis eget mi. Morbi ante risus, tincidunt vitae imperdiet vel, scelerisque
    a sem. Pellentesque blandit mauris vel tortor vestibulum at hendrerit est vehicula.
    Aliquam ac tempor magna. Donec eget arcu nec libero tristique sollicitudin.
    Donec convallis interdum felis in sodales. Praesent velit velit, tristique a
    pellentesque ac, posuere ac massa. Phasellus cursus quam sed mi suscipit pretium.
    Morbi faucibus ornare viverra.</span></div>
<div id="flash2">
    <span lang="pt-br" style="color: white;">Cras justo magna, adipiscing at mattis
    in, venenatis sit amet nisi. Integer interdum ligula eget mi blandit varius.
    Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos
    himenaeos. Phasellus ac massa vitae enim tincidunt venenatis eu nec massa. Quisque
    tristique massa eu metus porttitor vulputate. Vivamus imperdiet quam rutrum
    turpis sagittis in placerat neque interdum. Aliquam id orci non massa accumsan
    bibendum feugiat nec lorem. Pellentesque mattis tempor lobortis. Pellentesque
    nisi est, adipiscing vitae pellentesque a, mattis at purus. Ut elit erat, lacinia
    vel ullamcorper id, commodo in leo. Ut quis viverra sem.</span></div>
<div style="">
    Morbi id risus mi. Donec et mi in ante mattis ullamcorper. Fusce adipiscing
    sem nec purus luctus eget vestibulum enim vestibulum. Morbi augue purus, consequat
    vitae convallis vel, cursus sed elit. Vivamus consectetur augue a ante gravida
    rhoncus. Nam eget nulla dignissim felis cursus molestie. Praesent non eleifend
    dui. Sed sed odio a orci mollis dapibus id sit amet nulla. Aliquam consectetur,
    libero at lobortis tempus, nunc purus euismod urna, in auctor massa ligula ac
    sapien. Nullam gravida egestas eros, in scelerisque lectus rhoncus a. Vestibulum
    ullamcorper odio eget nibh scelerisque ullamcorper. Morbi mollis eleifend quam,
    a lobortis lectus laoreet vel. Curabitur laoreet feugiat risus sit amet semper.
    Donec in lobortis purus. Aliquam erat volutpat. Nullam malesuada, urna eu porta
    consectetur, sapien elit vehicula ante, in molestie augue orci a sapien.
</div>
<div id="mov1">
Lorem ipsum
</div>

</body>

</html>

DEMO

Ate +

Tags:

Comments (9) -

mbt sandals People's Republic of China
5/13/2011 11:03:41 PM #

This is a very good blog. I appreciate very much this text, thank you.

mbt sandals People's Republic of China
5/23/2011 10:43:09 PM #

The blog was absolutely fantastic!

mbt sandals People's Republic of China
5/23/2011 10:44:01 PM #

The blog was absolutely fantastic!

Sea Breeze Travels United Kingdom
5/25/2011 7:27:07 AM #

I simply wanted to add a comment here to say thanks for you very nice ideas. Blogs are troublesome to run and time consuming therefore I appreciate when I see well written material. Your time isn't going to waste with your posts. Thanks so much and carry on You'll defintely reach your goals! have a great day!

Nike 6.0 Shoes People's Republic of China
7/1/2011 6:33:24 AM #

Terrific work! This is the type of information that are meant to be shared around the web. Disgrace on the seek for not positioning this post higher! Come on over and discuss with my web site . Thank you =)

Nike 6.0 Shoes People's Republic of China
7/1/2011 6:33:42 AM #

Simply want to say your article is as surprising. The clearness in your post is simply great and i can assume you are an expert on this subject. Fine with your permission let me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please continue the rewarding work.

Kelsey Gowda United States
8/31/2011 6:15:32 AM #

Your place is valueble for me. Thanks!…

Carbon CopyPro United States
11/28/2011 9:49:48 AM #

You are so awesome.  I can't believe I missed this blog for so long.  Its just great stuff all round about . Its very well written blog. Thanks!..

Cheap wedding dresses United States
12/15/2011 12:43:54 AM #

Very happy to see your article, I very much to like and agree with your point of view. Thank you for sharing. At the same time,i love best pram very much .Welcome to look at my website and blog articles.Hope we can become good friends, and exchange and to help each other! Thanks!!

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


Sobre Mim

Felipe Augusto Silva Lambert - Analista de Sistemas, experiência em 4 anos desenvolvimento ASP.NET, utilizando tecnologias ServerSide (Design Patterns, Linq, WCF, SQL Server, C# e VB.NET) e ClientSide (JavaScript e Jquery). técnico em Mecatrônica e bacharel em Ciência da Computação.

Widget Month List not found.

Unknown server tag 'blog:MonthList'.X