HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/pianob/wp-content/plugins/cmssuperheroes/assets/js/jquery.shuffle.cms.js
(function($){
    $(document).bind('ready ajaxComplete',function(){
       $('.cms-grid-masonry').each(function(){
          $this = $(this);
          $filter = $this.parent().parent().parent().find('.cms-grid-filter');
          $this.imagesLoaded(function(){
            var $current = $this.parent().attr('data-current');
            $this.shuffle({
               itemSelector:'.cms-grid-item',
            });
            if($current != undefined){
              $this.shuffle('shuffle', $current );
            }
          });
          if($filter){
            $filter.find('a').click(function(e){
              e.preventDefault();
              // set active class
              $filter.find('a').removeClass('active');
              $(this).addClass('active');
                   
              // get group name from clicked item
              var groupName = $(this).attr('data-group');
              $this.parent().attr('data-current', groupName);
              if(groupName == undefined){
                $this.parent().attr('data-current', '');
              }
              // reshuffle grid
              $(this).parent().parent().parent().parent().find('.cms-grid-masonry').shuffle('shuffle', groupName );
              return false;
            });
          }
       });  
    });
})(jQuery);