$(document).ready(function(){ var objstr = ".change ul li"; $(objstr + ":not(:first)").css("display","none"); setinterval(function(){ if( $(objstr + ":last").is(":visible")){ $(objstr + ":first").fadein("slow").addclass("in"); $(objstr + ":last").hide() } else{ $(objstr + ":visible").addclass("in"); $(objstr + ".in").next().fadein("slow"); $(objstr + ".in").hide().removeclass("in")} },4000) })