var wh = $(window).height(); function getprogress(obj) { obj.attr({ "data-value": parseint(obj.attr("ui-progress")) }); var top = obj.offset().top; var scrolltop = $(document).scrolltop(); if (obj.attr("data-complete") == "off") { return; } else { if (top >= scrolltop && top <= (scrolltop + wh)) { if(parseint(obj.attr("ui-progress")) >=100){ createcircles(obj[0], 100, 45, 112, 112, "#e4393c"); obj.attr("data-complete", "off"); countfun(obj.find("span"), parseint(obj.attr("ui-progress"))); }else { if(obj.attr("ui-progress") > 0 && obj.attr("ui-progress") < 1) { obj.attr("ui-progress", "1"); }else if(obj.attr("ui-progress") > 99 && obj.attr("ui-progress") < 100) { obj.attr("ui-progress", "99"); } obj.attr("data-complete", "off"); countfun(obj.find("span"), parseint(obj.attr("ui-progress"))); createcircles(obj[0], parseint(obj.attr("ui-progress")), 45, 112, 112, "#e4393c"); } } } } $(window).scroll(function() { $(".showlist").find(".holder").each(function(index) { var top = $(this).offset().top; var scrolltop = $(document).scrolltop(); if ($(this).attr("data-complete") == "off") { return; } else { if (top >= scrolltop && top <= (scrolltop + wh)) { if(parseint($(this).attr("ui-progress")) >=100){ createcircles($(this)[0], 100, 45, 112, 112, "#e4393c"); $(this).attr("data-complete", "off"); countfun($(this).find("span"), parseint($(this).attr("ui-progress"))); }else { if($(this).attr("ui-progress") > 0 && $(this).attr("ui-progress") < 1) { $(this).attr("ui-progress", "1"); }else if($(this).attr("ui-progress") > 99 && $(this).attr("ui-progress") < 100) { $(this).attr("ui-progress", "99"); } $(this).attr("data-complete", "off"); countfun($(this).find("span"), parseint($(this).attr("ui-progress"))); createcircles($(this)[0], parseint($(this).attr("ui-progress")), 45, 112, 112, "#e4393c"); } } } }); }); function getcountdown(obj,allowinvesttime,timediff,pd5countdownnum) { var countdown = "pd5-countdownnum"+pd5countdownnum; obj.addclass(countdown); var interval = window.setinterval(function() { var now = new date().gettime(); var second =(allowinvesttime-(now+timediff))/1000; if(second>0){ getrtime(second,countdown); second--; }else{ var parentdiv = $("."+countdown).parent().parent(); var itemid = parentdiv.find("#itemid").val(); var paymentmode = parentdiv.find("#paymentmode").val(); $("."+countdown).parent().remove(); var indexpifhtml = '
'+paymentmode+'
立即投资' + '