title: CHtml::link Confirm repeats Yii
body: <p><strong>FOUND THAT <code>CStarRating</code> is causing this error if it is removed it gets ok.Also CStarRating makes page render extremely slow plus it also causes other jquery plugins to malfunction</strong></p>
  
  <p>I have used confirmation inside a <code>Jquery</code> <code>acordin</code>. main tabs of acordin are <code>Categories</code> and in side there is Items. User can delete both Items and Categories(of course different tables and models).</p>
  
  <p>Now when I click on delete category it asks should it delete or not .....Till now everything is fine but as long as I click cancel AND category has Items in its panel confirm repeats itself for number of items time. following is my code. Please help me out</p>
  
  <p>Following <code>Image</code> will illustrate what I mean <img src="https://i.stack.imgur.com/mPNLz.jpg" alt="enter image description here">
  Thanks</p>
  
  <pre><code>&lt;?php
  foreach($model-&gt;categories as $Category){
          echo  CHtml::link('&lt;span id="add_new_item"&gt;Add New Item &lt;/span&gt;', array('items/create','id'=&gt;$Category-&gt;id));
          echo ' &lt;span id="update_del_category"&gt;';
          $image = CHtml::image('/Hunt2Eat/assets/b4e73c2b/gridview/update_item.png', 'Update', array('class' =&gt; 'view'));
          echo  'Edit';
          echo  CHtml::link($image, array('category/update', 'id'=&gt;$Category-&gt;id));
          $image = CHtml::image('/Hunt2Eat/assets/b4e73c2b/gridview/delete_item.png', 'Delete', array('class' =&gt; 'view'));
          echo  ' Delete';
          echo  CHtml::link($image,'#',array('submit'=&gt;array('category/delete','id'=&gt;$Category-&gt;id),'confirm' =&gt; 'Are you sure you want to delete '.$Category-&gt;name.'?'));
  
      echo  '&lt;/span&gt;
            &lt;ul style="width:99%;" id="menu3" class="menu noaccordion"&gt;
              &lt;li style="width:100%; "&gt;
                  &lt;a href="#" style="color:white; padding:6px 0 6px 5px;"&gt;'.$Category-&gt;name.'&lt;/a&gt;
                      &lt;ul style="width:99%"&gt;
                          &lt;div id="item_headings"&gt;
                               &lt;label id="item_name"&gt; Name &lt;/label&gt;
                               &lt;label id="item_price"&gt; Price (PKR)&lt;/label&gt;
                               &lt;label id="item_rating"&gt; Rating &lt;/label&gt;
                          &lt;/div&gt;';
  
  foreach($Category-&gt;items as $Item)
      {
      echo  '&lt;div id="update_del_item"&gt;';
      echo   CHtml::link('Edit', array('items/update', 'id'=&gt;$Item-&gt;id));
      echo  '&lt;/div&gt;
                   &lt;div id="update_del_item"&gt;';
      echo  CHtml::link('Delete','#',array('submit'=&gt;array('items/delete','id'=&gt;$Item-&gt;id),'confirm' =&gt; 'Are you sure?'));
      echo  '&lt;/div&gt;
                  &lt;li &gt;
                  &lt;a href="#" name="Item"&gt;
                      &lt;div style="height:20px; width: 360px;"&gt;
                          &lt;span id="item_list"&gt;'.$Item-&gt;name.'&lt;/span&gt;
                          &lt;span id="item_list"&gt;'.$Item-&gt;price.'&lt;/span&gt;
                          &lt;span style="float:right;"&gt;'.$this-&gt;renderPartial('_rating',array('model'=&gt;$model),TRUE,TRUE).'&lt;/span&gt;
                      &lt;/div&gt;    
                  &lt;/a&gt;                
              &lt;/li&gt;';
  }//For Loop to Extract category Items from category Array
      echo 
             '&lt;/ul&gt;
          &lt;/li&gt;
       &lt;/ul&gt;';
  }//For Loop to Extract Categories from Hotel array
  
  ?&gt;
  </code></pre>