PageSourceSearch

https://muzej-jugoslavije.org/wp-content/themes/mij/static/js/custom/timeline.min.js?ver=1

js muzej-jugoslavije.org collected 2026-10-02 05:28:27 UTC 4,763 bytes, 1 lines download raw bytes

1function postBackground(){$(".swiper-wrapper").each(function(){var e=0;$(this).find(".swiper-slide").each(function(){e+=parseInt($(this).width(),10)}),$(this).find('[data-js="post-background"]').width(e+$(window).width()),e=0})}$(function(){function e(){$(".years .years-item").each(function(){var e=$(this).data("yearto"),i=$(this).data("image"),s=$("#slider").slider("values",0);e<=Math.floor(s)?($(this).addClass("is-finished"),$('[data-js="timeline"]').css("background","url("+i+") no-repeat #2C2728")):$(this).removeClass("is-finished")})}var i="",s=new Swiper(".timeline__top-posts",{nextButton:".swiper-button-next",prevButton:".swiper-button-prev",slidesPerView:"auto",scrollbarHide:!1,onSliderMove:function(e,s){i="top"},onSlideChangeEnd:function(s){if("top"==i){$("#slider").slider("option","value",$(".timeline__top-posts .swiper-slide.swiper-slide-active").data("year")),$(".follow").width(parseInt($("#slider span").css("left"),10)+.1*$(window).width()),e();var a=$(".timeline__top-posts .swiper-slide").eq(s.activeIndex).data("year"),o=!1;$(".timeline__bottom-posts .swiper-slide").each(function(){a===$(this).data("year")&&o===!1?(t.slideTo($(".timeline__bottom-posts .swiper-slide[data-year='"+a+"']").index()),o=!0):a===$(this).data("year")+1&&o===!1?(t.slideTo($(".timeline__bottom-posts .swiper-slide[data-year='"+$(this).data("year")+"']").index()),o=!0):a===$(this).data("year")+2&&o===!1?(t.slideTo($(".timeline__bottom-posts .swiper-slide[data-year='"+$(this).data("year")+"']").index()),o=!0):a===$(this).data("year")+3&&o===!1&&(t.slideTo($(".timeline__bottom-posts .swiper-slide[data-year='"+$(this).data("year")+"']").index()),o=!0)})}}}),t=new Swiper(".timeline__bottom-posts",{slidesPerView:"auto",onSliderMove:function(){i="bottom"},onSlideChangeEnd:function(t){if("bottom"==i){$("#slider").slider("option","value",$(".timeline__bottom-posts .swiper-slide.swiper-slide-active").data("year")),$(".follow").width(parseInt($("#slider span").css("left"),10)+.1*$(window).width()),e();var a=$(".timeline__bottom-posts .swiper-slide").eq(t.activeIndex).data("year"),o=!1;$(".timeline__top-posts .swiper-slide").each(function(){a===$(this).data("year")&&o===!1?(s.slideTo($(".timeline__top-posts .swiper-slide[data-year='"+a+"']").index()),o=!0):a===$(this).data("year")+1&&o===!1?(s.slideTo($(".timeline__top-posts .swiper-slide[data-year='"+$(this).data("year")+"']").index()),o=!0):a===$(this).data("year")+2&&o===!1?(s.slideTo($(".timeline__top-posts .swiper-slide[data-year='"+$(this).data("year")+"']").index()),o=!0):a===$(this).data("year")+3&&o===!1&&(s.slideTo($(".timeline__top-posts .swiper-slide[data-year='"+$(this).data("year")+"']").index()),o=!0)})}}}),a=1916,o=2017;$("#slider").slider({value:a,min:a,max:o,step:.1,slide:function(){var i=$("#slider").slider("values",0),a=[],o=[],d=0,l=0,n=i-Math.floor(i),r=[];switch($(".timeline__top-posts .swiper-slide").each(function(){l+=$(".timeline__top-posts .swiper-slide").width();var e=$(this).data("year");e===Math.floor(i)?(d++,$(this).addClass("nowActive"),a.push($(this).index()),r.push(e)):$(this).removeClass("nowActive")}),e(),d){case 0:break;case 1:s.slideTo(a[0]);break;case 2:.5>n?s.slideTo(a[0]):s.slideTo(a[1]);break;case 3:.33333>n&&s.slideTo(a[0]),n>.33333&&.66667>n?s.slideTo(a[1]):s.slideTo(a[2]);break;case 4:.25>n?s.slideTo(a[0]):n>.25&&.5>n?s.slideTo(a[1]):n>.5&&.75>n?s.slideTo(a[2]):s.slideTo(a[3])}var o=[],p=0,h=(i-Math.floor(i),[]);switch($(".timeline__bottom-posts .swiper-slide").each(function(){l+=$(".timeline__bottom-posts .swiper-slide").width();var e=$(this).data("year");e===Math.floor(i)?(p++,$(this).addClass("nowActive"),o.push($(this).index()),h.push(e)):$(this).removeClass("nowActive")}),p){case 0:break;case 1:t.slideTo(o[0]);break;case 2:.5>n?t.slideTo(o[0]):t.slideTo(o[1]);break;case 3:.33333>n&&t.slideTo(o[0]),n>.33333&&.66667>n?t.slideTo(o[1]):t.slideTo(o[2]);break;case 4:.25>n?t.slideTo(o[0]):n>.25&&.5>n?t.slideTo(o[1]):n>.5&&.75>n?t.slideTo(o[2]):t.slideTo(o[3])}$(".follow").width(parseInt($("#slider span").css("left"),10)+.1*$(window).width())}}
1),$(".years span").each(function(){var e=$(this),i=e.data("yearto");e.css("left","calc("+100*(i-a)/(o-a)+"% - 4px)")}),$("#slider").on("mousedown",function(){var i,a,o=$("#slider").slider("values",0);$(".timeline__top-posts .swiper-slide").each(function(){$(this).data("year")<=o&&(i=$(this).index())}),$(".follow").width(parseInt($("#slider span").css("left"),10)+.1*$(window).width()),s.slideTo(i),$(".timeline__bottom-posts .swiper-slide").each(function(){$(this).data("year")<=o&&(a=$(this).index())}),$(".follow").width(parseInt($("#slider span").css("left"),10)+.1*$(window).width()),t.slideTo(a),e()})}),postBackground(),$(window).on("resize",function(){postBackground()});

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.