miniMAC / magic

CSS3 Animations with special effects
https://www.minimamente.com/project/magic/
MIT License
8.45k stars 1.18k forks source link

works slow on more than 20 records #21

Closed adilsaeed31 closed 9 years ago

adilsaeed31 commented 10 years ago

hi,

i used this magictime in my project, nice effects, but i have added the condition with jquery which is below but less 10 records display fine, but more than 20 records hangs the browser for 1 sec or 2 sec and then effects also not work properly.

$('.letters').click(function(e) {

    var filter = $(this).attr('id');

    if (filter == "all")
    {
      $('#filter div').each(function(){

            $(this).removeClass('magictime puffIn').hide();
        });

        $('#filter div').each(function(){

            $(this).addClass('magictime puffIn').show();
        });

      /*  $('#filter div').hide().removeClass('magictime puffIn');
        $('#filter div').addClass('magictime puffIn').show();*/

    } else {

        $('#filter .col-md-3:not(.' + filter + ')').removeClass('magictime puffIn').hide();
        $('#filter .'+filter).show().addClass('magictime puffIn');
    }
});