---
title: Options
category: docs
layout: doc
body_class: option-def
related: a-intro
---
<dl class="header clearfix">
<dt><code>option</code></dt>
<dd class="option-type">Type</dd>
<dd class="default">Default</dd>
</dl>
## animationEngine
<dl class="clearfix">
<dt><code>animationEngine</code></dt>
<dd class="option-type">String</dd>
<dd class="default"><code><span class="s1">'best-available'</span></code></dd>
</dl>
Determines the jQuery method to apply styles, `.css()` or `.animate()`. Useful for relying on CSS transitions to handle animation.
### Values {#animationEngine-values}
+ `'best-available'`: if browser supports CSS transitions, Isotope uses `.css()`. If not, falls back to using `.animate()`.
+ `'css'`: Isotope uses `.css()`
+ `'jquery'`: Isotope uses `.animate()`
## animationOptions
<dl class="clearfix">
<dt><code>animationOptions</code></dt>
<dd class="option-type">Object</dd>
<dd class="default"><code>{ queue: <span class="kc">false</span>, duration: <span class="mi">800</span> }</code></dd>
</dl>
When jQuery is the animation engine, these options will be used in <code>.animate()</code>. See the [jQuery API for animate options](http://api.jquery.com/animate/#animate-properties-options) for details.
### Example
{% highlight javascript %}
$('#container').isotope({
animationOptions: {
duration: 750,
easing: 'linear',
queue: false
}
});
{% endhighlight %}
## containerClass
<dl class="clearfix">
<dt><code>containerClass</code></dt>
<dd class="option-type">String</dd>
<dd class="default"><code><span class="s1">'isotope'</span></code></dd>
</dl>
The class applied to the container element.
## filter
<dl class="clearfix">
<dt><code>filter</code></dt>
<dd class="option-type">Selector</dd>
</dl>
Setting a filter with show item elements that match the selector, and hide elements that do not match. See [docs on filering](filtering.html) for more details.
[**See Demo: Filtering**](../demos/filtering.html)
### Values {#filter-values}
+ `'*'` Shows all item elements
## getSortData
<dl class="clearfix">
<dt><code>getSortData</code></dt>
<dd class="option-type">Object</dd>
</dl>
An object containing one or several methods to retrieve data for Sorting. The methods receive one parameter (`$elem` in the example below) which is a jQuery object representing each item element. The methods need to return a value. See [docs on sorting](sorting.html) for more details.
[**See Demo: Sorting**](../demos/sorting.html)
### Example
{% highlight javascript %}
$('#container').isotope({
getSortData : {
symbol : function( $elem ) {
return $elem.attr('data-symbol');
},
number : function( $elem ) {
return parseInt( $elem.find('.number').text(), 10 );
},
name : function ( $elem ) {
return $elem.find('.name').text();
}
}
});
{% endhighlight %}
## hiddenClass
<dl class="clearfix">
<dt><code>hiddenClass</code></dt>
<dd class="option-type">String</dd>
<dd class="default"><code><span class="s1">'isotope-hidden'</span></code></dd>
</dl>
The class applied to item elements hidden by Filtering.
## hiddenStyle
<dl class="clearfix">
<dt><code>hiddenStyle</code></dt>
<dd class="option-type">Object</dd>
<dd class="default"><code>{ opacity : <span class="mi">0</span>, scale : <span class="mi">0.001</span> }</code></dd>
</dl>
The style applied to item elements hidden by Filtering.
## itemClass
<dl class="clearfix">
<dt><code>itemClass</code></dt>
<dd class="option-type">String</dd>
<dd class="default"><code><span class="s1">'isotope-item'</span></code></dd>
</dl>
The class applied to item elements.
## itemSelector
<dl class="clearfix">
<dt><code>itemSelector</code></dt>
<dd class="option-type">Selector</dd>
</dl>
Restricts Isotope item elements to selector.
## layoutMode
<dl class="clearfix">
<dt><code>layoutMode</code></dt>
<dd class="option-type">String</dd>
<dd class="default"><code><span class="s1">'masonry'</span></code></dd>
</dl>
See also docs on [Layout Modes](layout-modes.html).
[**See Demo: Layout Modes**](../demos/layout-modes.html)
## resizable
<dl class="clearfix">
<dt><code>resizable</code></dt>
<dd class="option-type">Boolean</dd>
<dd class="default"><code><span class="kc">true</span></code></dd>
</dl>
Triggers layout logic when browser window is resized.
## sortAscending
<dl class="clearfix">
<dt><code>sortAscending</code></dt>
<dd class="option-type">Boolean</dd>
<dd class="default"><code><span class="kc">true</span></code></dd>
</dl>
Used with sorting. If true, items are sorted ascending: "1, 2, 3" or "A, B, C...". If false, items are sorted descending "Z, Y, X" or "9, 8, 7...". See [docs on sorting](sorting.html) for more details.
[**See Demo: Sorting**](../demos/sorting.html)
## sortBy
<dl class="clearfix">
<dt><code>sortBy</code></dt>
<dd class="option-type">String</dd>
</dl>
The property name of the method within the `getSortData` option to sort item elements. See [docs on sorting](sorting.html) for more details.
[**See Demo: Sorting**](../demos/sorting.html)
### Values {#sortBy-values}
+ `'original-order'` Sorts item elements by their original order.
## visibleStyle
<dl class="clearfix">
<dt><code>visibleStyle</code></dt>
<dd class="option-type">Object</dd>
<dd class="default"><code>{ opacity : <span class="mi">1</span>, scale : <span class="mi">1</span> }</code></dd>
</dl>
The style applied to item elements made visible by Filtering.
## Layout-specific options
In addition the general options listed above, certain layout modes each have their own options. In order to avoid conflict, these options are set with an option that matches the name of the layout mode.
See docs on [layout modes](layout-modes.html) for each layout mode's available options.
For example, if your layout switched from `masonry` to `cellsByRow`:
{% highlight javascript %}
$('#container').isotope({
masonry: {
columnWidth: 120
},
cellsByRow: {
columnWidth: 220,
rowHeight: 220
}
});
{% endhighlight %}
[**See Demo: Layout Modes**](../demos/layout-modes.html)