From: ScottDowne Date: Thu, 23 Dec 2010 19:48:25 +0000 (-0500) Subject: [#63] href is optional, and removed the border X-Git-Tag: v0.2~22^2~5^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2f1cffec05b80c86ae31bf298ce95707877697cc;p=popcorn-js.git [#63] href is optional, and removed the border --- diff --git a/plugins/image/popcorn.image.html b/plugins/image/popcorn.image.html index 2ce3a7c..7686592 100644 --- a/plugins/image/popcorn.image.html +++ b/plugins/image/popcorn.image.html @@ -19,7 +19,7 @@ .image({ start: 20, // seconds end: 45, // seconds - href: 'http://www.drumbeat.org/webmademovies', + // no href src: 'http://patriciabergeron.net/wp-content/uploads/web.made_.movie_marquee.gif', target: 'imagediv' } ); diff --git a/plugins/image/popcorn.image.js b/plugins/image/popcorn.image.js index 88de1d5..454458c 100644 --- a/plugins/image/popcorn.image.js +++ b/plugins/image/popcorn.image.js @@ -4,8 +4,8 @@ /** * Images popcorn plug-in - * Creates an iframe showing a website specified by the user - * Options parameter will need a start, end, id, target and src. + * Shows an image element + * Options parameter will need a start, end, href, target and src. * Start is the time that you want this plug-in to execute * End is the time that you want this plug-in to stop executing * href is the url of the destination of a link @@ -48,13 +48,16 @@ options.link = document.createElement( 'a' ); options.link.style.display = "none"; // display none by default - options.link.href = options.href; + if ( options.href ) { + options.link.href = options.href; + } options.link.target = "_blank"; document.getElementById( options.target ).appendChild( options.link ); // add the widget's div to the target div var img = document.createElement( 'img' ); img.src = options.src; + img.style.borderStyle = "none"; // borders look really bad, if someone wants it they can put it on their div target options.link.appendChild( img );