jquery - Original order in isotope is not working -


i trying fix "original order" not working, tried make "(i based code here)", didn't work.

here code: isotope original order

my intent make ascending, descending, , normal or original position of boxes think not working. tried research on internet , found problem is, not working on code.

can take on code , give me advice how solve it? thank you.

jquery

$(window).load(function(){  //configure var $container = $('#item-container');  $container.isotope({     filter: '*',     animationoptions: {         duration: 750,         easing: 'linear',         queue: false     },      getsortdata : {             name : function ( $elem ) {             return $elem.find('.name').text();           }       },  });   //sorting $('#sorts li a').click(function(){         $('#sorts li a.current').removeclass('current');         $(this).addclass('current');          var selector = $(this).attr('data-sort');         $container.isotope({             filter: selector,          });          return false; });   //ascending $('.sorting_a-z').on( 'click', function( event ) {      $container.isotope({          itemselector : '.item',          sortby: 'name', sortascending : true     });   });  //descending $('.sorting_z-a').on( 'click', function( event ) {      $container.isotope({          itemselector : '.item',          sortby: 'name', sortascending : false     });   });   //put on original position $('.all_items').on( 'click', function( event ) {       $container.isotope({          itemselector : '.item',         filter: filtervalue      });      return false; });}); 

i tried manage how put in original order.

here code.

fixed code orginal order

jquery

$(window).load(function(){  //configure var $container = $('#item-container');  $container.isotope({     filter: '*',     animationoptions: {         duration: 750,         easing: 'linear',         queue: false     },      getsortdata : {             name : function ( $elem ) {             return $elem.find('.name').text();           }       },  });   //sorting $('#sorts li a').click(function(){         $('#sorts li a.current').removeclass('current');         $(this).addclass('current');          var selector = $(this).attr('data-sort');         $container.isotope({             filter: selector,          });          return false; });   //ascending $('.sorting_a-z').on( 'click', function( event ) {      $container.isotope({          itemselector : '.item',          sortby: 'name', sortascending : true     });   });  //descending $('.sorting_z-a').on( 'click', function( event ) {      $container.isotope({          itemselector : '.item',          sortby: 'name', sortascending : false     });   });}); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -