1 2 3 4 5 6(function ($) { 7 8 function accordeonclick() { 9 $(".accordeonitem > a").on("click", function(event) { 10 $( this ).closest( ".accordeonitem" ).toggleClass("current"); 11 event.preventDefault(); 12 return false; 13 }); 14 } 15 function mediascroll() { 16 $(".version").on("click", function(event) { 17 var selected = $(this).attr( 'data' ); 18 var allbuttons = $( this ).closest( ".versions" ); 19 var thewholecontent = $( this ).closest( ".media-single-scroll-wrapper" ); 20 var thecontent = thewholecontent.find("div."+selected); 21 var thecontentPosition = Math.round(thecontent.position().left); 22 thewholecontent.css("margin-left","-"+thecontentPosition+"px"); 23 thewholecontent.find(".current").removeClass("current"); 24 thecontent.addClass("current"); 25 thecontent.find("a."+selected).addClass("current"); 26 event.preventDefault(); 27 return false; 28 }); 29 } 30 31 function countclicks() { 32 $("a.countclicks").on("click", function(event) { 33 var mediaid = $(this).attr( 'mediaid' ); 34 var url = $(this).attr( 'href' ); 35 if (url != '#') { 36 window.open(url, '_blank'); 37 } 38 $.ajax({ 39 type: "POST", 40 url: "https://klaas.com/de//wp-admin/admin-ajax.php", 41 data: { action: "countclickone", postId: mediaid } 42 }); 43 event.preventDefault(); 44 return false; 45 }); 46 } 47 48 function scrollIfAnchor() { 49 if (window.location.hash.length && $(':target')) { 50 var target = $(window.location.hash); 51 $(".accordeonitem").removeClass("current").addClass("notransition"); 52 target.closest(".accordeonitem").addClass("current"); 53 target.addClass("current"); 54 var targetoffset = target.offset(); 55 var scrollto = targetoffset.top - 338; // minus fixed header height 56 $('html, body').animate({scrollTop:scrollto}, 0); 57 $(".accordeonitem").removeClass("notransition"); 58 if ( target.hasClass( "media-single-video" ) ) { 59 showvideo(target.find('a.showvideo')); 60 } 61 62 } 63 } 64 65 $( document ).ready(function() { 66 scrollIfAnchor(); 67 accordeonclick(); 68 mediascroll(); 69 countclicks(); 70 }); 71})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.