-
-
Save marcoceppi/921587 to your computer and use it in GitHub Desktop.
This file contains 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
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