Browse Source

src & docs : remove single option setter; update method doc

pull/96/head
David DeSandro 14 years ago
parent
commit
ada909841a
  1. 9
      _posts/docs/2010-12-04-methods.mdown
  2. 8
      jquery.isotope.js
  3. 2
      jquery.isotope.min.js

9
_posts/docs/2010-12-04-methods.mdown

@ -92,20 +92,13 @@ Positions specified item elements in layout.
{% endhighlight %} {% endhighlight %}
Modifies options for plugin instance. Can be used to get and set options. Unlike passing options through `.isotope()`, using the `option` method will not trigger layout. Sets options for plugin instance. Unlike passing options through `.isotope()`, using the `option` method will not trigger layout.
{% highlight javascript %} {% highlight javascript %}
// sets multiple options // sets multiple options
.isotope( 'option', { layoutMode: 'fitRows', filter: '.my-filter' } ) .isotope( 'option', { layoutMode: 'fitRows', filter: '.my-filter' } )
// set single option
.isotope( 'option', 'layoutMode', 'straightDown' )
// get option
.isotope( 'option', 'layoutMode' )
// returns 'straightDown'
{% endhighlight %} {% endhighlight %}

8
jquery.isotope.js

@ -439,8 +439,7 @@
}, },
option: function( key, value ){ option: function( key, value ){
// get/change options AFTER initialization: // change options AFTER initialization:
// signature: $('#foo').bar({ cool:false }); // signature: $('#foo').bar({ cool:false });
if ( $.isPlainObject( key ) ){ if ( $.isPlainObject( key ) ){
this.options = $.extend(true, this.options, key); this.options = $.extend(true, this.options, key);
@ -448,11 +447,6 @@
for ( optionName in key ) { for ( optionName in key ) {
this._updateOption( optionName ); this._updateOption( optionName );
} }
// signature: $('#foo').bar('option', 'baz', false);
} else {
this.options[ key ] = value;
this._updateOption( key );
} }
}, },

2
jquery.isotope.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save