Skip to content

Instantly share code, notes, and snippets.

@nathanpc
Created June 9, 2012 19:57
Show Gist options
  • Select an option

  • Save nathanpc/2902345 to your computer and use it in GitHub Desktop.

Select an option

Save nathanpc/2902345 to your computer and use it in GitHub Desktop.
Wrong onscreenready Example
bb.init({
onscreenready: function (element, id) {
if (id == "main") {
var item = document.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');
document.getElementById('mylist').appendItem(item);
$("#button").css("display", "block");
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment