title: Setting widget attributes in Yii Bootstrap
body: <p>I just started with the Yii framework using the bootstrap theme; everything is awesome,
  except that I can't find a way of naming attributes in bootstrap widgets. For instance site has a chat button, how do i access it by <code>jQuery('#id')</code>?</p>
  
  <p>I tried adding in the <code>id</code> attribute of the same array as follows:</p>
  
  <pre><code>&lt;?php $this-&gt;widget('bootstrap.widgets.TbButton',array(
      'buttonType'=&gt;'link',
      'icon' =&gt; 'icon-user icon-white',
      'type'=&gt;'info',
      'label'=&gt;'Live chat',
      'url'=&gt;'javascript:switchChat();',
      'id'=&gt;'chatPopup'
      )); ?&gt;
  </code></pre>
  
  <p>Ok, after little head scratching i found out about htmlOptions array and itemOptions :)</p>
  
  <p>Ok finally got there</p>
  
  <pre><code>        'class'=&gt;'bootstrap.widgets.TbMenu',
          'items'=&gt;array(
              array('label'=&gt;'Home', 'url'=&gt;array('/site/index')),
              array('label'=&gt;'Messages ()',
                    'url'=&gt;array('/site/messages'),
                    'visible'=&gt;!Yii::app()-&gt;user-&gt;isGuest,
                    'itemOptions'=&gt;array('class'=&gt;'msgcnt'),
              ),
  </code></pre>
  
  <p>But this doesn't generate attributes for me, except the standard url, type, etc.</p>
  
  <p>So the only way I am currently able to do this is by placing widgets within <code>div</code> wrappers with ids, but how would I deal with those widgets where <code>div</code> is unacceptable, for example in the case of a navbar?</p>