Skip to content

Instantly share code, notes, and snippets.

@nathanpc
Created June 9, 2012 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanpc/2902353 to your computer and use it in GitHub Desktop.
Save nathanpc/2902353 to your computer and use it in GitHub Desktop.
Correct onscreenready Example
bb.init({
onscreenready: function (element, id) {
if (id == "main") {
var item = element.createElement('div');
item.setAttribute('data-bb-type','item');
item.setAttribute('data-bb-title','my title');
item.innerHTML = 'my description';
item.setAttribute('data-bb-img','foo.png');
element.getElementById('mylist').appendItem(item);
$("#button", element).css("display", "block");
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment