I have been busy recently, but I don't know what I am busy with. Yes, this is my recent life, which is in dire straits...

 Busy Busy.png

People keep leaving and entering in life, so what they see is invisible, what they remember is forgotten, and what they gain and lose is constant in life, so what they see is invisible, and what they forget is remembered. The scorching summer brings light rain, warm wind and beautiful summer. The swirling blue patterns make us feel beautiful. Maybe life is busy and green, and we often have no time to enjoy beautiful scenery. However, the wind, rain, flowers, grass, blue sky, white clouds are also a kind of scenery. My friends put down their work for the time being, Take a few seconds to feel the subtle and ordinary beauty. Let life be so simple and beautiful. Thank all my friends who support me - real and online, familiar and unfamiliar. Thank you for your company and support. At the same time, I wish you cherish your life and cherish the people in front of you.

The above text is taken from the female monologue version of "The Mark of Rain" on the Internet. I like this tone very much, but, to get back to the point...

It seems that the zblogphp infinite drop-down is really practical in some topics, so I wrote down this tutorial. I forgot to see it there before. When I created the theme yesterday, I felt that it was very set up and the theme was used: the tutorial is also very simple, and it can be solved with a piece of JavaScript.

 (function(e){"use strict";Date.now=Date.now||function(){return+(new Date)},e.ias=function(t){function u(){var t;i.onChangePage(function(e,t,r){s&&s.setPage(e,r),n.onPageChange.call(this,e,r,t)});if(n.triggerPageThreshold>0)a(); else if(e(n.next).attr("href")){var u=r.getCurrentScrollOffset(n.scrollContainer);E(function(){p(u)})}return s&&s.havePage()&&(l(),t=s.getPage(),r.forceScrollTop(function(){var n;t>1?(v(t),n=h(! 0),e("html, body").scrollTop(n)):a()})),o}function a(){c(),n.scrollContainer.scroll(f)}function f(){var e,t;e=r.getCurrentScrollOffset(n.scrollContainer),t=h(),e>=t&&(m()>=n.triggerPageThreshold? (l(),E(function(){p(e)})):p(e))}function l(){n.scrollContainer.unbind("scroll",f)}function c(){e(n.pagination).hide()}function h(t){var r,i;return r=e(n.container).find(n.item).last(),r.size()===0? 0:(i=r.offset().top+r.height(),t||(i+=n.thresholdMargin),i)}function p(t,r){var s; s=e(n.next).attr("href"); if(! s)return n.noneleft&&e(n.container).find(n.item).last().after(n.noneleft),l(); if(n.beforePageChange&&e.isFunction(n.beforePageChange)&&n.beforePageChange(t,s)===!1)return;i.pushPages(t,s),l(),y(),d(s,function(t,i){var o=n.onLoadItems.call(this,i),u;o!==!1&&(e(i).hide(),u=e(n.container).find(n.item).last(),u.after(i),e(i).fadeIn()),s=e(n.next,t).attr("href"),e(n.pagination).replaceWith(e(n.pagination,t)),b(),c(),s?a():l(), n.onRenderComplete.call(this,i),r&&r.call(this)})}function d(t,r,i){var s=[],o,u=Date.now(),a,f;i=i||n.loaderDelay,e.get(t,null,function(t){o=e(n.container,t).eq(0),0===o.length&&(o=e(t).filter(n.container).eq(0)),o&&o.find(n.item).each(function(){s.push(this)}),r&&(f=this,a=Date.now()-u,a<i?setTimeout(function(){r.call(f,t,s)},i-a):r.call(f, t,s))}, "html")}function v(t){var n=h(!0);n>0&&p(n,function(){l(),i.getCurPageNum(n)+1<t? (v(t),e("html,body").animate({scrollTop:n},400,"swing")):(e("html,body").animate({scrollTop:n},1e3,"swing"),a())})}function m(){var e=r.getCurrentScrollOffset(n.scrollContainer);return i.getCurPageNum(e)}function g(){var t=e(".ias_loader");return t.size()===0&&(t=e('<div class="ias_loader">'+n.loader+"</div>"),t.hide()), t}function y(){var t=g(),r;n.customLoaderProc!==!1?n.customLoaderProc(t):(r=e(n.container).find(n.item).last(),r.after(t),t.fadeIn())}function b(){var e=g();e.remove()}function w(t){var r=e(".ias_trigger");return r.size()===0&&(r=e('<div class="ias_trigger"><a href="#">'+n.trigger+"</a></div>"),r.hide()),e("a", r).unbind("click").bind("click",function(){return S(),t.call(),! 1}),r}function E(t){var r=w(t),i;n.customTriggerProc!==!1?n.customTriggerProc(r):(i=e(n.container).find(n.item).last(),i.after(r),r.fadeIn())}function S(){var e=w();e.remove()}var n=e.extend({},e.ias.defaults,t),r=new e.ias.util,i=new e.ias.paging(n.scrollContainer),s=n.history?new e.ias.history:! 1,o=this;u()},e.ias.defaults={container:"#container",scrollContainer:e(window),item:".item",pagination:"#pagination",next:".next",noneleft:!1,loader:'<img src="images/loader.gif"/>',loaderDelay:600,triggerPageThreshold:3,trigger:"Load more items",thresholdMargin:0,history:!0,onPageChange:function(){},beforePageChange:function(){}, onLoadItems:function(){},onRenderComplete:function(){},customLoaderProc:!1,customTriggerProc:!1},e.ias.util=function(){function i(){e(window).load(function(){t=!0})}var t=! 1,n=!1,r=this;i(),this.forceScrollTop=function(i){e("html,body").scrollTop(0),n||(t? (i.call(),n=!0):setTimeout(function(){r.forceScrollTop(i)},1))},this.getCurrentScrollOffset=function(e){var t,n;return e.get(0)===window? t=e.scrollTop():t=e.offset().top,n=e.height(),t+n}},e.ias.paging=function(){function s(){e(window).scroll(o)}function o(){var t,s,o,f,l;t=i.getCurrentScrollOffset(e(window)),s=u(t),o=a(t),r!==s&&(f=o[0],l=o[1],n.call({},s,f,l)),r=s}function u(e){for(var n=t.length-1;n>0;n--)if(e>t[n][0])return n+1; return 1}function a(e){for(var n=t.length-1;n>=0;n--)if(e>t[n][0])return t[n]; return null}var t=[[0,document.location.toString()]],n=function(){},r=1,i=new e.ias.util; s(),this.getCurPageNum=function(t){return t=t||i.getCurrentScrollOffset(e(window)),u(t)},this.onChangePage=function(e){n=e},this.pushPages=function(e,n){t.push([e,n])}}})(jQuery);$. Ias ({thresholdMargin: - 100, triggerPageThreshold: 2, history: false, container: '. redo list', item: '. post item', pagination: '. pagination', next: '. next page a', loader: '<div class="pagination loading"><i class="fa fa spinner"></i>Data loading</div>', trigger: '<div class="load tip" id="next">Click to load more</ div>',onPageChange:function(pageNum,pageUrl,scrollOffset){window._ gaq&&window._gaq.push(['_trackPageview',jQuery('<a/>').attr('href',pageUrl)[0].pathname.replace(/^[^\/]/,'/')])}});

As shown above, we only need to modify zblogphp in two places:

container: ' .reco-list ',

item: ' .post-item ',

Replace. redo list with your list<ul class="">frame name

Replace item with your<li class="">name. This may be somewhat abstract. Take a screenshot to see:

 Zblogphp Unlimited Dropdown Tutorial.jpg

It's clear this time. Because the div naming of each theme is not uniform, it needs to be modified.

Css is as follows:

 /*Unlimited drop-down list*/ .reco-list .ias_trigger{clear:both;text-align:center;display:block;height:76px;line-height:76px;cursor:pointer;-webkit-transition: all .5s ease 0s;- moz-transition: all .5s ease 0s;- o-transition: all .5s ease 0s; width:980px;border-radius:6px;background:#fff;margin-bottom: 20px; position: relative;} .reco-list .load-tip{font-size:16px;color:#000;} .load-tip a{color:#39442e; text-decoration:none;outline:0} #next{clear:both} .reco-list .ias_loader{width: 980px;border-radius: 6px; background: #fff; border: 1px solid #dedede; margin-bottom: 20px; padding: 20px 0px; line-height: 24px; position: relative; clear: both;} .pagination-loading {text-align: center;font-size: 14px;}

This can be modified according to your own preferences. Oh, yes, there is another place that needs to be modified temporarily, because when you get the next page, the web page will be loaded. The CSS may not be so friendly here, and you need to modify the CSS again. However, this excessive time is too fast, so you need to put:

loaderDelay:600, The 600 here refers to excessive milliseconds. If you need to modify the loading style, you need to set it larger, such as 6000000.

Finally, find the template home page and right-click to edit. As shown in the figure

 Zblogphp Unlimited Drop Down Tutorial2.jpg

 <div class="pagination"> <div class="next-page"><a href="{$pagebar.nextbutton}" ></a></div> </div>

Just add the above code. Everything is ready. Clear the cache in the background, refresh, and pull down the first show indefinitely.

Oh no, I forgot another thing. What happened to my memory recently...

By default, it is only loaded twice, that is, unlimited pull-down, and only appears twice. If necessary, you must click Load More, so you have to modify one:

triggerPageThreshold: two ,

Yes, that's it. 2 is loaded twice. Just modify it according to your habits.

It's finally finished. I'm going to eat some walnuts...

    Comment List (Already five Of comments three thousand and eighty-three Participation) Participate in the discussion
     Netizen nickname: Jieshan webmaster
    2016-08-15 reply
    Support bloggers
     Netizen nickname: Lu Songsong Blog
    Lu Songsong Blog tourist floor
    2016-08-13 reply
    From Baidu click in, support, hope webmaster you out some good articles.
     Netizen nickname: Android version one click forwarding
    2016-08-13 reply
    From Baidu click in, support, hope webmaster you out some good articles.
     Netizen nickname: Witkey part-time
    Wicker part-time job tourist sofa
    2016-08-12 reply
    Does the web front end belong to the same link as UI design?