It fuckin' works\!

This commit is contained in:
magnolia-fan
2011-04-10 07:17:34 +04:00
parent 135f10d73a
commit 259cbd6a84
4 changed files with 50 additions and 36 deletions
+4 -8
View File
@@ -1,12 +1,8 @@
$(function(){
$('.play').click(function(){
$.get('/listen/'+ $(this).parent().attr('id') +'/', function(res){
if (res.status == 'ok') {
$('#player audio').attr('src', res.data.url);
$('#player #artist').html(res.data.artist);
$('#player #title').html(res.data.track);
$('#player audio').play();
}
})
$('#player audio').attr('src', '/listen/'+ $(this).parent().attr('id')) +'/';
$('#player #artist').html($('h1.artist').html());
$('#player #title').html($(this).parent().find('.track-name').html());
$('#player audio').play();
})
})