Relax Breath of Solution.Community tech blog of Sameera Thilakasiri - Consultant UI, UX, RWD Specialist/ Interactive Designer

Just I wanted.. Do you?…

jQuery creating custom animations

Posted on September 29, 2011 | No Comments

<HTML>
	<HEAD>
		<TITLE> jQuery creating custom animations </TITLE>
		<script type="text/javascript" src="https://ajax.googleapis.com/
		ajax/libs/jquery/1.4.2/jquery.min.js"></script>
	</HEAD>
	<BODY>
		<div id="clickme" >
			<font color="red"> Click here </font>
		</div>
		<img id="book" src="http://ampersandtr.eweb101.discountasp.net/
		img/tm/co/SK/SIGIRAYA/Places%20To%20Visit%20In%20Sri%20Lanka%201.jpg"
		alt="" width="200" height="223"
		style="position: relative; left: 10px;" />
		<script>
			$('#clickme').click(function() {
				$("#targetDiv").hide();
				$('#book').animate({
					opacity : 0.25,
					left : '+=50',
					height : 'toggle'
				}, 5000, function() {
					// Animation complete.
					$("#targetDiv").html("<h3>" + "Click link to animate" + "</h3>").fadeIn("slow");
				});
			});
		</script>
		<font color="blue">
			<div id="targetDiv" style="display: none;"></div>
		</font>
	</BODY>
</HTML>

Author
Sameera Thilakasiri By Sameera Thilakasiri
,is a front-end developer based in Colombo, is a blogger and a lifestyle photographer.
Follow him Twitter and Google+. Check out him.

Comments

Leave a Reply

You must be logged in to post a comment.