Вход Регистрация
Файл: jscript/audio.js
Строк: 59
<?php
function update_audio()
{
    $(
'.player .add').attr('id',$('.jp-playlist-current p.discription').text());
    var 
track_name = $("#name-of-the-song-that-plays").html();
    $(
'img[onclick="Audio.Pause(this.id);"]').attr('src','/design/img/play.png').attr('onclick','Audio.Play(this.id);');
    $(
'img[name="'+track_name+'"]').attr('src','/design/img/pause.png').attr('onclick','Audio.Pause(this.id);');
    
setTimeout("update_audio()",2000);
}

var 
Audio = {
    
Play: function(id){
    $(
'#jquery_jplayer_1').jPlayer('destroy');
    $(
'img.track').attr('src','/design/img/play.png').attr('onclick','Audio.Play(this.id);');        
    $(
'.player').load('/ajax/player.php?track_num='+id, {ajax'yes'}, function(data){
    $(
'.player').show();
    $(
"#name-of-the-song-that-plays").html($('img#'+id).attr('name'));
        
    });
    },
    
AddTrack: function(id){
        $(
'.player .player_notifications').remove();
        $.
get('/ajax/addtrack.php?id='+id, function(data){
            $(
'.player').append('<div class="player_notifications"></div>');
            $(
'.player .player_notifications').html(data).fadeIn(1000);
        });
    },
    
Pause: function(){
        $(
'#jquery_jplayer_1').jPlayer('destroy');
        $(
'img[onclick="Audio.Pause(this.id);"]').attr('src','/design/img/play.png').attr('onclick','Audio.Play(this.id);');
        $(
'.player').html('').hide();
    },
    
PlaylistOpen: function(){
        $(
'.playlist').attr('onclick','Audio.PlaylistClose();');
        $(
'.jp-playlist').css('height','300px');
    },
    
PlaylistClose: function(){
        $(
'.playlist').attr('onclick','Audio.PlaylistOpen();');
        $(
'.jp-playlist').css('height','0');
    },
    
MyPlaylist: function(){
        $(
'#jquery_jplayer_1').jPlayer('destroy');
        $(
'.player').html('').hide();
        $(
'.player').load('/ajax/player.php?playlist=my', {ajax'yes'}, function(data){
        $(
'.playlist').attr('onclick','Audio.PlaylistClose();');
        $(
'.player .add').hide();
        $(
'.player').show();    
        $(
'.jp-playlist').css('height','300px');
    });
    }
}
?>
Онлайн: 1
Реклама