blackberry/bbUI.js — pull request #439 by kquinsland (2012-11-04 20:07:08+00:00)
Title: Next

**{resubmission; this time on the *next* branch}**

added setCaption() and setCaption() methods to titlebars on BBOS5,6,7 Devices. Usage is now

```javascript

var tb = document.getElementById('myApp_titleBar');

// when no argument is passed in, titleBar text is taken from the 'data-bb-caption' attribute; useful when other code has modified the attribute indirectly
tb.setCaption();

// set the titleBar text and the 'data-bb-caption' to the value of myNewText; useful when other code needs to modify the titleBar directly

var myNewText = "Updated titleBar text";
tb.setCaption(myNewText);

```