Created
June 10, 2016 10:48
-
-
Save pwnz22/79855f4006e900fbfb28f7df66dc95ee to your computer and use it in GitHub Desktop.
showmore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('.products_wrapper .content_product:lt(4)').show(); | |
var items = 8; | |
var shown = 4; | |
jQuery('#loadMore').click(function (event) { | |
event.preventDefault(); | |
shown = jQuery('.products_wrapper .content_product:visible').size()+5; | |
if(shown< items) { | |
jQuery('.products_wrapper .content_product:lt('+shown+')').show(); | |
} else { | |
jQuery('.products_wrapper .content_product:lt('+items+')').show(); | |
jQuery('#loadMore').hide(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment