I\'ve read some of the similar questions but they don\'t quite answer this query of mine.
I am building a website that uses Viddler video hosting. In their embed code yo
With jQuery you can load and execute JavaScript on demand. Before loading the script, append the playlist part to the script url like this:
HTML
Play list A
Play list B
Play list C
jQuery
$(".playlist-link").click(function(e){
e.preventDefault();
var playlist = $(this).attr("href");
var url = 'http://www.viddler.com/tools/vidget.js' +
'?widget_type=js_list' +
'&widget_width=940' +
'&source=playlist' +
'&user=USERNAME ' +
'&playlist='+ playlist +
'&style=grid'+
'&show_player=true'+
'&player_type=simple'+
'&max=12'+
'&videos_per_row=6'+
'&v=2.0'+
'&id=XXXXXXXXXX';
$.getScript(url, function(data, textStatus){
alert('This is executed after your script is loaded');
});
});