Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Js Loadmore content or images
- //All divs are display none
- .single-gallery-col {
- display: none;
- }
- //JS
- // Load more gallery images
- $(function () {
- var TotalElement = $(".single-gallery-col").length;
- var currentElement = 9;
- $(".single-gallery-col").slice(0, 9).show();
- $("#loadMore").on('click', function (e) {
- e.preventDefault();
- $(".single-gallery-col:hidden").slice(0, 3).fadeIn('600');
- currentElement=currentElement+3;
- if (TotalElement <= currentElement) {
- $("#loadMore").css({"display":"none"});
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement