X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/248250233ed99390536a6d427758d8cb606c8b57..743fc7a6d0086d6e0a2706db4d6a1b5cd1ef00d9:/wolnelektury/static/js/catalogue.js?ds=inline diff --git a/wolnelektury/static/js/catalogue.js b/wolnelektury/static/js/catalogue.js index 71225e189..3eb007470 100644 --- a/wolnelektury/static/js/catalogue.js +++ b/wolnelektury/static/js/catalogue.js @@ -464,7 +464,7 @@ function serverTime() { return false; }); - $('.sponsor-logos').cycle({timeout: 3000}); + //$('.sponsor-logos').cycle({timeout: 3000}); $('.widget-code').focus( function(){ @@ -495,20 +495,19 @@ function serverTime() { // player for audiobooks // event handlers for playing different formats - $('p.header span').click(function(){ - if(this.className != "desc"){ - $('.audiobook-list').hide(); - $('p.header span.active').attr('class', ''); - // we don't want to interact with "audiobook" label, just 'format' tabs - this.className = "active"; - $("#"+$("p.header span.active").html().toLowerCase()+"-files").show(); - } + $('.audiotabs span').click(function(){ + $('.audiobook-list').hide(); + $('.audiotabs .active').removeClass('active'); + // we don't want to interact with "audiobook" label, just 'format' tabs + var $this = $(this); + $this.addClass("active"); + $("#"+$this.attr('data-format')+"-files").show(); }); - - - + $('.audiobook-list').hide(); - $("#"+$("p.header span.active").html().toLowerCase()+"-files").show(); + if($(".audiotabs .active").length > 0) { + $("#"+$(".audiotabs .active").html().toLowerCase()+"-files").show(); + } /* this will be useful for javascript html player var medias = $('.audiobook-list a');