},
_setup: function( options ) {
-
+ var s, st;
+
options.link = document.createElement( 'a' );
options.link.style.display = "none"; // display none by default
if ( options.href ) {
backgroundSize : '100%',
MozBackgroundSize: '100%',
borderStyle : 'none'
- }
- for (s in divStyle) {
- div.style[s] = divStyle[s];
+ };
+ for ( s in divStyle ) {
+ div.style[ s ] = divStyle[ s ];
}
var divText = document.createElement( 'div' ); // add the inner div for overlaying text
color : 'black',
fontWeight : 'bold',
textAlign : 'center'
+ };
+ for ( st in divTextStyle ) {
+ divText.style[ st ] = divTextStyle[ st ];
}
- for (st in divTextStyle) {
- divText.style[st] = divTextStyle[st];
- }
- divText.innerHTML = options.text
+ divText.innerHTML = options.text;
- div.appendChild( divText);
+ div.appendChild( divText );
options.link.appendChild( div );
},
end: 3, // seconds
href: 'http://www.drumbeat.org/',
src: 'https://www.drumbeat.org/media//images/drumbeat-logo-splash.png',
+ text: 'DRUMBEAT',
target: 'imagediv'
} );
if( popped.currentTime() > 1 && popped.currentTime() < 3 ) {
ok( /display: inline;/.test( imagediv.innerHTML ), "Div contents are displayed" );
plus();
- ok( /img/.test( imagediv.innerHTML ), "An image exists" );
+ equals (imagediv.children[0].children[0].style.backgroundImage.indexOf ( 'https' ), "4", "An image exists" );
plus();
clearInterval( interval );
}