Sha256: 6a671d4992779999e0164e40e3687d42d03c682cb75c82a1f0701f06ddbdd1f7

Contents?: true

Size: 1.09 KB

Versions: 11

Compression:

Stored size: 1.09 KB

Contents

      var $optionSets = $('#options .option-set'),
          $optionLinks = $optionSets.find('a');

      $optionLinks.click(function(){
        var $this = $(this);
        // don't proceed if already selected
        if ( $this.hasClass('selected') ) {
          return false;
        }
        var $optionSet = $this.parents('.option-set');
        $optionSet.find('.selected').removeClass('selected');
        $this.addClass('selected');
  
        // make option object dynamically, i.e. { filter: '.my-filter-class' }
        var options = {},
            key = $optionSet.attr('data-option-key'),
            value = $this.attr('data-option-value');
        // parse 'false' as false boolean
        value = value === 'false' ? false : value;
        options[ key ] = value;
        if ( key === 'layoutMode' && typeof changeLayoutMode === 'function' ) {
          // changes in layout modes need extra logic
          changeLayoutMode( $this, options )
        } else {
          // otherwise, apply new options
          $container.isotope( options );
        }
        
        return false;
      });

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bonethug-0.0.17 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js
bonethug-0.0.16 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js
bonethug-0.0.15 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js
bonethug-0.0.14 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js
bonethug-0.0.13 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js
bonethug-0.0.12 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js
bonethug-0.0.11 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js
bonethug-0.0.10 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js
bonethug-0.0.7 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js
bonethug-0.0.6 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js
bonethug-0.0.5 skel/project_types/silverstripe3/public/abc/javascript/library/jQuery/isotope/_includes/option-set-buttons.js