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

Just I wanted.. Do you?…

jQuery fading elements in and out

Posted on September 29, 2011 | No Comments

Fading elements in and out

			ul {
				margin-left: 20px;
				color: blue;
			li {
				cursor: default;
			span {
				color: red;
		<script src="jquery-1.4.2.js"></script>
	<h3><font color="red">Hover on any element to see effect</font></h3>
			<li class='fade'>Patties</li>
			<li class='fade'>Noodles</li>
			$("li").hover(function() {
				$(this).append($("<span><<< </span>"));
			}, function() {
			//li with fade class
			$("li.fade").hover(function() {


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.


Leave a Reply

You must be logged in to post a comment.