123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- var nowHref = $(".ajaxpage").children("a:first-of-type").attr("href");
- var nextHref_ = $(".ajaxpage").children("a:last-of-type").attr("href");
- $(".case_more a").on("click",function(){
- if(nowHref == nextHref_ ){
- $(".case_more a").html("没有更多内容了").addClass("nomore");
- return;
- }
- $(".case_more a").html("努力加载中...");
- $.ajax({
- url: nextHref_,
- success:function(data){
-
- setTimeout(function(){
- var nextHref = $(data).find(".ajaxpage").children("a:last-of-type").attr("href");
- if(nextHref_ != nowHref ){
- html = $(data).find("#ajax_list_ul").html();
- $("#ajax_list_ul").append(html);
- $(".case_more a").html("查看更多>>");
- nowHref = nextHref_;
- nextHref_ = nextHref;
-
- $(".caseList li").hover(function(){
- $(this).find(".mask").stop().fadeIn();
- $(this).find(".title").stop().animate({"bottom":"50%","opacity":"1"});
- $(this).find(".des").stop().delay(200).animate({"bottom":"38%","opacity":"1"});
- },function(){
- $(this).find(".mask").stop().fadeOut();
- $(this).find(".title").stop().animate({"bottom":"-40px","opacity":"0"});
- $(this).find(".des").stop().animate({"bottom":"-40px","opacity":"0"});
- })
-
- }else{
- $(".case_more a").html("没有更多内容了").addClass("nomore");
- }
- },1000)
- }
- });
- });
|