<p><strong>Heads up!</strong> To receive the <code>loading</code> event, you must subscribe to it before initializing the plugin, otherwise it will fire before you have subscribed to it.</p>
<h3>Get notified when shuffle is done with setup</h3>
<p>To receive the <code>loading</code> and <code>done</code> events, you must subscribe to them before initializing the plugin, otherwise they will fire before you have subscribed to them</p>
<p>The <code>columnWidth</code> option is used to calculate the column width. You have several options:</p>
<ol>
<li>Use a <strong>sizer</strong> element. This is the easest way to specify column and gutter widths. You can use an element or an element wrapped in jQuery. The column and gutter widths will be measured using this element. The <code>sizer</code> option is an alias for <code>columnWidth</code>.<spanclass="demo-link-container">See <ahref="{{ site.baseurl }}{% post_url demos/2013-05-01-basic %}">a demo</a> using a sizer element or <ahref="{{ site.baseurl }}/js/demos/homepage.js">look at the js file</a> for the sizer demo.</span></li>
<li>Use a <strong>sizer</strong> element. This is the easest way to specify column and gutter widths. You can use an element or an element wrapped in jQuery to define the column width and gutter width. Shuffle will measure the <code>width</code> and <code>margin-left</code> of this <code>sizer</code> element each time the grid resizes. This is awesome for responsive or fluid grids where the width of a column is a percentage. The <code>sizer</code> option is an alias for <code>columnWidth</code>.<spanclass="demo-link-container">See <ahref="{{ site.baseurl }}{% post_url demos/2013-05-01-basic %}">a demo</a> using a sizer element or <ahref="{{ site.baseurl }}/js/demos/homepage.js">look at the js file</a> for the sizer demo.</span></li>
<li>Use a <strong>function</strong>. When a function is used, its first parameter will be the width of the shuffle element. You need to return the column width for shuffle to use (in pixels).</li>
<li>A <strong>number</strong>. This will explicitly set the column width to your number (in pixels).</li>
<li>By default, shuffle will use jQuery's <codeclass="language-javascript">outerWidth(true)</code> to calculate the column width of the first item and use that value.</li>
<li>By default, shuffle will use the width of the first item to calculate the column width.</li>