Skip to content

Instantly share code, notes, and snippets.

@marcoceppi
Forked from lazypower/foo.js
Created April 15, 2011 11:56
Show Gist options
  • Save marcoceppi/921587 to your computer and use it in GitHub Desktop.
Save marcoceppi/921587 to your computer and use it in GitHub Desktop.
function EmbedVid(someID)
{
html = $('#embed-template').clone();
html.attr('flashvars','value="file=upload/' + someID + '.flv&image=images/vidThumbs/' + someID + '.jpg"');
html.find('embed').attr('flashvars','file=upload/' + someID + '.flv&image=images/vidThumbs/' + someID + '.jpg"');
// better clear the video holder
$('#video-holder').empty();
$('#video-holder').append(html);
}
// wrap this in the document.ready method, so it knows what to attach to
$(document).ready(function()
{
$('.embedLink').click(function()
{
var foo = $(this).attr('title');
EmbedVid(foo);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment