Tuesday, March 6, 2012

code zone jQuery Crash Course - Day 4 | Simple timed animation

[sourcecode language="javascript"]
<html>
<head>
<title>Simple Animation</title>
<style type="text/css">
#myDiv
{
width:300px;
height:200px;
background-color:#0C0;
}
</style>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">

$('document').ready(function(){

$('#myLink').click(function(){

$('#myDiv').animate({"width" : "50px"},1000);
$('#myDiv').animate({"height" : "50px"},1000);
$('#myDiv').animate({"width" : "100px","height" : "100px"},2000);

});
});

</script>

</head>

<body>
<a href="#" id="myLink">Click Me</a>
<div id="myDiv">

</div>
</body>
</html>


[/sourcecode]

No comments:

Post a Comment

How to enable CORS in Laravel 5

https://www.youtube.com/watch?v=PozYTvmgcVE 1. Add middleware php artisan make:middleware Cors return $next($request) ->header('Acces...