Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.77 KB | None | 0 0
  1. $( document ).ready(function() {
  2.     jQuery('.groupCategoryThematic .leftCol .group').each(function () {
  3.  
  4.         var getData = jQuery(this).find('.content').attr('group');
  5.         var getCount = jQuery(this).find('li').length;
  6.  
  7.         if (getCount > 5) {
  8.             jQuery(this).find('.more').removeClass('hidden');
  9.             jQuery(this).find('li').slice(5).addClass('hidden');
  10.  
  11.             jQuery(this).find('a.more').click(function() {
  12.                 jQuery(this).prev('.list').find('li').removeClass('hidden');
  13.                 jQuery(this).addClass('hidden');
  14.             });
  15.         }
  16.  
  17.         jQuery(this).find('a.btn').click(function() {
  18.             jQuery(this).closest('.group').find('.content').toggleClass('hidden');
  19.         });
  20.        
  21.     });
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement