So, I want to use a jQuery function to collect a URL from a link's REL, and pass it to a element.
Collecting the REL and sending it to the is no problem... but what's required to trigger the element's load and play functions, from jQuery?
Here's what I have so far:
$(function(){
$('a.componentLink').click(function() {
event.preventDefault();
var vidURL = $(this).attr('rel');
$('#myVideo > source').attr('src', vidURL);
$('#myVideo').load();
$('#myVideo').play();
})
});
ATM, it doesn't play... I assume jQuery doesn't natively have access to the play function... but there must be a way around that.