jquery Plugin Implementation Waterfall Flow Picture Show Example _jquery

Source: Internet
Author: User

jquery Masonry and infinitescroll two waterfall stream plug-ins make the most popular waterfall stream picture Display example, through the mouse scrolling picture infinite load similar to the waterfall effect of the picture display. Users can unlimited browsing pictures or content to load the waterfall stream effect indefinitely.

Code:

<script type= "Text/javascript" > Function Item_masonry () {$ ('. Item img '). Load (function () {$ ('. Infinite_scrol   
  L '). Masonry ({itemselector: '. Masonry_brick ', columnwidth:226, gutterwidth:15});
     
  });               
  $ ('. Infinite_scroll '). Masonry ({itemselector: '. Masonry_brick ', columnwidth:226, gutterwidth:15 
}); } $ (function () {function Item_callback () {$ ('. Item '). mouseover (function () {$ (this). CSS (' Box-shadow '
      , ' 0 1px 5px rgba (35,25,25,0.5) ');
    $ ('. Btns ', this). Show ();
      }). mouseout (function () {$ (this). CSS (' Box-shadow ', ' 0 1px 3px rgba (34,25,25,0.2) ');     
    $ ('. Btns ', this). Hide ();
     
    }); 
 
  Item_masonry (); 
 
  } item_callback ();
 
  $ ('. Item '). FadeIn (); var sp = 1 $ (". Infinite_scroll"). Infinitescroll ({navselector: "#more", Nextselector: "#more a", it Emselector: ". Item", loading:{img: "IMAGES/MASONRY_LOADING_1.GIf ", Msgtext: ', finishedmsg: ' Wood has ', finished:function () {sp++;
          if (sp>=10) {//To page 10th End Event $ ("#more"). Remove ();
          $ ("#infscr-loading"). Hide ();
          $ ("#page"). Show ();
        $ (window). Unbind ('. Infscr ');
    }},errorcallback:function () {$ ("#page"). Show ();
    }},function (newelements) {var $newElems = $ (newelements);
    $ ('. Infinite_scroll '). Masonry (' appended ', $newElems, false);
    $newElems. FadeIn ();
    Item_callback ();
  Return
 
});
}); </script>

Demo pictures

The above is the entire content of this article, I hope to be able to learn jquery help.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.