Created
April 14, 2011 23:30
-
-
Save lazypower/920831 to your computer and use it in GitHub Desktop.
Marco, can you read this better than my normal spaghetti?
This file contains hidden or 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.children()); | |
} | |
// 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