Created
June 9, 2012 19:57
-
-
Save nathanpc/2902345 to your computer and use it in GitHub Desktop.
Wrong onscreenready Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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