Saturday, December 10, 2011

Fading image using jquery FadeTo


<script src="Scripts/jquery-1.7.min.js" type="text/javascript"></script>
<script>
window.setInterval("Method()", 1000);
Method = function () {
var ff = parseFloat($("img").css("opacity")).toFixed(1);
// alert(ff);
if (ff == 0.6)
$("img").fadeTo("slow", 1);
else
$("img").fadeTo("slow", 0.6);
};
</script>


<img border="0" src="Images/Bald.jpg" width="400" />

No comments :

Post a Comment

AJAX, asp, Asp.net, asp.net and sql server security, Asp.net IntemIndex, C#, Css, DataBinder.Eval, DataKeyNames, Datalist, Datapager, DataSet, DataTable, DropDownList, FindControl, gridview, JavaScript, jquery, Listview, Paging, Regex, RegularExpression, Repeater, Server side validation, Sql Server, timer, timercallback, Validation, XML, xmlnode, XPath