Yii Isotope Jquery

Hi I am using the Yii isotope extension and it works really well!

However, when i first load the page all my items are bunched up. I’ve read that you can use the imagesLoaded function for this issue but I’m not sure where to change this option.

my widget:

<?php

$this->widget(‘ext.isotope.Isotope’,array(

'dataProvider'=&gt; &#036;dataProvider,


'itemView'=&gt;'_itemviews',


'itemSelectorClass'=&gt;'item',


'options'=&gt;array(), // options for the isotope jquery


'infiniteScroll'=&gt;true, // default to true


'infiniteOptions'=&gt;array(),


// javascript options for infinite scroller


'id'=&gt;'wall',

)); ?>

my view file:

<div class="container">

<div class="post item">

&lt;div class=&quot;well&quot;&gt;


  


 &lt;div class=&quot;masonaryImage&quot;&gt;


   &lt;span class=&quot;image-wrapper&quot;&gt;


        &lt;span class=&quot;image-options&quot;&gt;


            


            &lt;span class=&quot;image-icons&quot;&gt;


                &lt;?php &#036;this-&gt;widget('ItemLikeDislikeFavorite',array('item_id'=&gt;&#036;data-&gt;item_id));?&gt;


            &lt;/span&gt;


            


        &lt;/span&gt;





                &lt;a href=&quot;&lt;?php echo Yii::app()-&gt;createUrl('items/view',array('id'=&gt;&#036;data-&gt;item_id))?&gt;&quot;&gt;


                    &lt;?php &#036;dir = Yii::app()-&gt;request-&gt;baseUrl.'/uploads/'.&#036;data-&gt;user_id; ?&gt;


                    &lt;?php echo CHtml::image(&#036;dir.'&#092;&#092;'.&#036;data-&gt;image_url,&quot;image&quot;); ?&gt;


                &lt;/a&gt;


       


    &lt;/span&gt; 


&lt;/div&gt;





    &lt;div class=&quot;info&quot;&gt;


      &lt;div class =&quot;item_info&quot;&gt;


             &lt;div class =&quot;item_data&quot;&gt;


             &lt;i&gt;&lt;b&gt;&lt;?php echo &#036;data-&gt;description; ?&gt;&lt;/b&gt;&lt;/i&gt;


             &lt;/div&gt;





             &lt;div class =&quot;item_data&quot;&gt;


             &lt;?php echo &#036;data-&gt;price; ?&gt;


             &lt;/div&gt;


           


             &lt;div class =&quot;item_data&quot;&gt;


             &lt;b&gt;Ends&lt;/b&gt;


             &lt;?php echo &#036;data-&gt;end_date; ?&gt;


             &lt;/div&gt;


           


             &lt;div class =&quot;item_data&quot;&gt;


                &lt;?php &#036;this-&gt;widget('CreateItemComments',array('item_id'=&gt;&#036;data-&gt;item_id));?&gt;


             &lt;/div&gt;


       &lt;/div&gt;


    &lt;/div&gt;





    &lt;/div&gt;

</div>

</div>

Please help! I am new to Yii