open the correct subpage when the media player loads

This commit is contained in:
Robin Appelman 2011-07-30 00:32:09 +02:00
parent 93dd1c57cc
commit 773d23bbd5
2 changed files with 5 additions and 2 deletions

View File

@ -12,6 +12,10 @@ $(document).ready(function(){
PlayList.render();
Collection.hide();
});
var tab=window.location.href.slice(window.location.href.indexOf('#') + 1);
if(tab=='collection'){
$('#plugins a[href="#collection"]').trigger('click');
}
});

View File

@ -26,8 +26,7 @@ PlayList.render=function(){
tr.data('index',i);
tr.click(function(){
PlayList.play($(this).data('index'));
PlayList.parent.children('tr').removeClass('current');
$(this).addClass('current');
PlayList.render();
});
tr.hover(function(){
var button=$('<img class="remove" title="Remove"/>');