$(function () { $("#Setraty").raty({ starOff: '/js/raty/images/star-off1.png', starOn: '/js/raty/images/star-on1.png', score: 1, click: function (score, evt) { var _score = score; var _workID = '726593'; //ajax开始======================================= $.ajax({ type: "POST", async: false, dataType: "json", url: "/ajax/show.ashx", data: { tion: "setraty", score: _score, workID: _workID }, success: function (data) { console.log(data); if (data.status == "1") { art.dialog({ title: false, id: 'user', icon: 'succeed', content: data.info, // lock: true, time: 2 }); $("#Setraty").raty({ starOff: '/js/raty/images/star-off1.png', starOn: '/js/raty/images/star-on1.png', readOnly: true, score: _score }); } } }); //ajax结束======================================= } }); //顶和踩 $(".topdown li").click(function () { var _operation = $(this).attr("id"); var _workID = '726593'; //ajax开始======================================= $.ajax({ type: "POST", async: false, dataType: "json", url: "/ajax/show.ashx", data: { tion: "topstep", operation: _operation, workID: _workID }, success: function (data) { if (data.status == "1") { if (_operation == "worktop") { $("#worktop a").html(parseInt($("#worktop a").text()) + 1); } if (_operation == "workstep") { $("#workstep a").html(parseInt($("#workstep a").text()) - 1); } } else { art.dialog({ title: false, id: 'user', icon: 'error', content: data.info, time: 2 }); } art.dialog({ title: false, id: 'user', icon: 'succeed', content: data.info, time: 1 }); } }); //ajax结束======================================= }); //设置评星 $(".showraty").raty({ readOnly: true, starOff: '/js/raty/images/star-off.png', starOn: '/js/raty/images/star-on.png', score: function () { return $(this).attr('data-score'); } }); }); function Collection($_workID) { //ajax开始======================================= $.ajax({ type: "POST", url: "/ajax/Collection.ashx", dataType: "json", data: { action: "collection", workID: $_workID }, success: function (data) { if (data.status == 1) { if (data.tion == "add") { var number = parseInt($("#collection").text()) + 1 $(".collection i").css({ "display": "block" }).animate({ top: '-35px' }, 500, function () { $(this).hide(); $(this).css({ "top": "0px" }); $("#collection").html(number); }); $(".fav").html("取消收藏"); $(".popover_collection a").html("取消收藏"); } else if (data.tion == "del") { var number = parseInt($("#collection").text()) - 1 $("#collection").html(number); $(".fav").html("收藏"); $(".popover_collection a").html("收藏"); } } else { art.dialog({ title: false, id: 'user', icon: 'warning', content: data.info, lock: true, time: 2 }); } } }); //ajax结束======================================= } //for (i = 0; i < $(".workContent img").length; i++) { // var src = $(".workContent img").eq(i).attr("src"); // $(".workContent img").eq(i).attr("src", "/images/load.gif"); // $(".workContent img").eq(i).attr("data-original", src); // $(".workContent img").eq(i).addClass("lazy"); // // $(".Scontent img").eq(i).attr("title", $(".Stitle a").text()); //} $(function () { $('img').lazyload({ effect: 'fadeIn' }); $(".Worklist").eq(1).addClass("SWorklist_last"); $(".xgraty").raty({ readOnly: true, starOff: 'http://3d.jzsc.net/js/raty/images/star-off.png', starOn: 'http://3d.jzsc.net/js/raty/images/star-on.png', score: function () { return $(this).attr('data-score'); } }); }); $(function () { inti(); }); $(window).resize(function () { inti(); }); function inti() { $(".srghtpin").pin({ containerSelector: ".showmian" }) }