javascript - How to completely remove/disable isotope after animation finishes? -


i'm using isotope js library give sorting animation div objects. fine until preform other action i've programmed before used work until applied isotope.js.

the problem container div on i'm applying isotope affected isotope. affected div prevents me make actions programmed before.

briefly, how remove effects of isotope? how rid of it?

here fiddle, after event occurs disable action happen:

code:

 var $container = $('#container').isotope({     itemselector: '.item',     isresizebound: false,     getsortdata: {         weight: function (itemelem) {             var weight = $(itemelem).find('.weight').text();             return parsefloat(weight.replace(/[\(\)]/g, ''));         }     } }); // bind sort button click $('.button').click(function () {     var sortbyvalue = $(this).attr('data-sort-by');     $container.isotope({         sortby: sortbyvalue     }); }); $container.isotope('on', 'arrangecomplete', function () {     alert('arrange complete');      //remove isotope effects completly, disable somehow, }); 

instead of removing isotope, try this, jsfiddle:

 $(".buttonz").click(function () {  var $newitems = $('<div class="item"><p class="weight">7</p></div>');  $('#container').prepend( $newitems).isotope( 'reloaditems' ).isotope({ sortby: 'original-order' });   }); 

Comments