I can now use `jekyll serve` and go to localhost:4000/Shuffle to see
the site and use relative links. This way it doesn't have to change
every time going from dev to production.
`jekyll serve --baseurl ""` also works to serve directly from localhost
without a subdirectory.
<p>For another example of advanced filters, check out the <ahref="{{ site.url }}/{% post_url demos/2013-05-02-adaptive %}">compounded filters demo</a>.</p>
<p>For another example of advanced filters, check out the <ahref="{{ site.baseurl }}{% post_url demos/2013-05-02-adaptive %}">compounded filters demo</a>.</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>. See <ahref="{{ site.url }}/{% post_url demos/2013-05-01-basic %}">a demo</a> using a sizer element or <ahref="{{ site.url }}/js/demos/homepage.js">look at the js file</a> for the sizer demo.</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. The column and gutter widths will be measured using this element. The <code>sizer</code> option is an alias for <code>columnWidth</code>. 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.</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>
<h3class="question__text">Why are images overlapping?</h3>
<pclass="question__answer">If the size of your items are dependent on images, they can overlap if shuffle is initialized before all the images have loaded. Check out <ahref="{{ site.url }}/{% post_url demos/2013-05-03-images %}">this demo</a> to see how to fix it.</p>
<pclass="question__answer">If the size of your items are dependent on images, they can overlap if shuffle is initialized before all the images have loaded. Check out <ahref="{{ site.baseurl }}{% post_url demos/2013-05-03-images %}">this demo</a> to see how to fix it.</p>
<p>You can encounter problems when shuffle item dimensions depend on images. <ahref="{{ site.url }}/{% post_url demos/2013-06-29-image-problems %}">Like this demo</a>. There are three good solutions to this.</p>
<p>You can encounter problems when shuffle item dimensions depend on images. <ahref="{{ site.baseurl }}{% post_url demos/2013-06-29-image-problems %}">Like this demo</a>. There are three good solutions to this.</p>
<ol>
<li>Set an explicit height on <code>.shuffle-item</code>s like the <ahref="{{ site.url }}/{% post_url demos/2013-05-01-basic %}">basic demo</a>.</li>
<li>Set an explicit height on <code>.shuffle-item</code>s like the <ahref="{{ site.baseurl }}{% post_url demos/2013-05-01-basic %}">basic demo</a>.</li>
<li>Similar to number 1, make the height of the image container a percentage of the width. This can be seen in the nav images above with the <code>div.keep-ratio</code>.</li>
<li>Get notified when images load (this page). In this case, I'm using <ahref="http://desandro.github.io/imagesloaded/">Desandro's images loaded plugin</a>. Please note that imagesloaded does not support IE7.</li>
<p>Demo in which shuffle item dimensions are based on images without a fix. <ahref="{{ site.url }}/{% post_url demos/2013-05-03-images %}">See here</a> for a solution.</p>
<p>Demo in which shuffle item dimensions are based on images without a fix. <ahref="{{ site.baseurl }}{% post_url demos/2013-05-03-images %}">See here</a> for a solution.</p>