摘要: Github地址:https://github.com/S lyn 0422/031702406 PSP表格: |PSP2.1 | Personal Software Process Stages|预估耗时(分钟)|实际耗时(分钟)| | | | : : | : :| | Planning | 计划 阅读全文
posted @ 2019-09-17 23:12 #%*i 阅读(280) 评论(3) 推荐(0) 编辑
function customTimer(inpId, fn) { if ($(inpId).length) { fn(); } else { var intervalId = setInterval(function() { if ($(inpId).length) { //如果存在了 clearInterval(intervalId); // 则关闭定时器 customTimer(inpId, fn); //执行自身 } }, 100); } } //添加 评论区的 形象照 function addImage() { var spen_html = "\ "; $(".blog_comment_body").append(spen_html); $(".blog_comment_body").before("
"); var feedbackCon = $(".feedbackCon").addClass("clearfix"); for (var i = 0; i < feedbackCon.length; i++) { var span = $(feedbackCon[i]).find("span:last")[0].innerHTML || "https://pic.cnblogs.com/face/sample_face.gif"; $(feedbackCon[i]).find(".body_right img").attr("src", span); var href = $(feedbackCon[i]).parent().find(".comment_date").next().attr("href"); $(feedbackCon[i]).find(".body_right a").attr("href", href); } } //页面加载完成是执行 $(function() { //添加 评论区的 形象照 customTimer(".blog_comment_body", addImage); });