* options variable
*/
start: function( event, options ){
- options._container.style.display = "inline";
+ var display = function () {
+ if ( options._container ) {
+ options._container.style.display = "inline";
+ } else {
+ setTimeout ( display, 10 );
+ }
+ }
+
+ display();
+
},
/**
* @member facebook
* options variable
*/
end: function( event, options ){
+ var hide = function () {
+ if ( options._container ) {
options._container.style.display = "none";
+ } else {
+ setTimeout ( hide, 10 );
+ }
+ }
+
+ hide();
}
});
-})( Popcorn );
\ No newline at end of file
+})( Popcorn );
test("Popcorn Facebook Plugin", function () {
var popped = Popcorn("#video"),
- expects = 5,
+ expects = 9,
count = 0,
interval,
interval2,
} )
.volume(0)
.play();
+
+ ok (document.getElementById('likediv'), "likediv exists on the page" );
+ plus();
+ ok (document.getElementById('likeboxdiv'), "likeboxdiv exists on the page" );
+ plus();
+ ok (document.getElementById('activitydiv'), "activitydiv exists on the page" );
+ plus();
+ ok (document.getElementById('facepilediv'), "facepilediv exists on the page" );
+ plus();
popped.exec( 2, function() {
ok ( document.getElementById( "likediv" ).innerHTML.length > 0, "No type specified. Like button added to div" );
ok ( document.getElementById( "facepilediv" ).innerHTML.length > 0, "Facepile is added to div" );
plus();
});
-});
\ No newline at end of file
+});