PageSourceSearch

https://www.bentarabudaya.com/assets/js/main.js?v=3

js bentarabudaya.com collected 2026-10-02 13:36:07 UTC 10,668 bytes, 409 lines download raw bytes

1$(document).ready(function () {
2  // $('.cover').slick({
3  //   arrows: false,
4  //   autoplay: true,
5  //   autoplaySpeed: 10000,
6  //   dots: true,
7  //   infinite: true,
8  //   speed: 500,
9  //   fade: true,
10  //   cssEase: 'linear',
11  //   lazyLoad: 'ondemand',
12  //   controls: false,
13  // });
14
15
16  $('.slider').slick({
17    arrows: true,
18    slidesToShow: 3,
19    slidesToScroll: 1,
20    autoplay: true,
21    autoplaySpeed: 2000,
22    cssEase: 'linear',
23    lazyLoad: 'ondemand',
24    controls: false,
25    responsive: [
26      {
27        breakpoint: 768,
28        settings: {
29          arrows: false,
30          centerMode: true,
31          centerPadding: '40px',
32          slidesToShow: 3
33        }
34      },
35      {
36        breakpoint: 480,
37        settings: {
38          arrows: false,
39          centerMode: true,
40          centerPadding: '40px',
41          slidesToShow: 1
42        }
43      }
44    ]
45  });
46
47  $('.sliderwide').slick({
48    arrows: true,
49    slidesToShow: 1,
50    slidesToScroll: 1,
51    autoplay: true,
52    autoplaySpeed: 5000,
53    dots: true,
54    cssEase: 'linear',
55    lazyLoad: 'ondemand',
56    controls: false,
57    responsive: [
58      {
59        breakpoint: 768,
60        settings: {
61          arrows: false,
62          centerMode: true,
63          centerPadding: '40px',
64          slidesToShow: 1
65        }
66      },
67      {
68        breakpoint: 480,
69        settings: {
70          arrows: true,
71          // centerMode: true,
72          // centerPadding: '40px',
73          slidesToShow: 1
74        }
75      }
76    ]
77  });
78
79  $('.sliderGalery').slick({
80    slidesToShow: 1,
81    slidesToScroll: 1,
82    arrows: false,
83    fade: true,
84    asNavFor: '.sliderGalery-nav',
85    responsive: [
86      {
87        breakpoint: 768,
88        settings: {
89          arrows: false,
90          centerMode: true,
91          centerPadding: '40px',
92          slidesToShow: 1
93        }
94      },
95      {
96        breakpoint: 480,
97        settings: {
98          arrows: true,
99          // centerMode: true,
100          // centerPadding: '40px',
101          slidesToShow: 1
102        }
103      }
104    ]
105  });
106
107  $('.sliderGalery-nav').slick({
108    slidesToShow: 4,
109    slidesToScroll: 1,
110    asNavFor: '.sliderGalery',
111    dots: false,
112    centerMode: true,
113    centerPadding: "40px",
114    focusOnSelect: true,
115    responsive: [
116      {
117        breakpoint: 768,
118        settings: {
119          arrows: false,
120          centerMode: true,
121          centerPadding: '40px',
122          slidesToShow: 3
123        }
124      },
125      {
126        breakpoint: 480,
127        settings: {
128          // arrows: true,
129          // centerMode: true,
130          // centerPadding: '40px',
131          slidesToShow: 3
132        }
133      }
134    ]
135  });
136
137  $(window).scroll(function () {
138    if ($(window).scrollTop() >= 650) {
139      $('.navigation').addClass('navigation--fixed');
140    }
141    else {
142      $('.navigation').removeClass('navigation--fixed');
143    }
144  });
145
146  //tablink change color
147  $('#Pagemenu1').on('click', function () {
148    $('#defaultOpen').addClass('active');
149    $('#pano, #strukturOrganisasiTab').removeClass('active');
150  });
151  $('#Pagemenu2').on('click', function () {
152    $('#pano').addClass('active');
153    $('#defaultOpen, #strukturOrganisasiTab').removeClass('active');
154  })
155  $('#Pagemenu3').on('click', function () {
156    $('#strukturOrganisasiTab').addClass('active');
157    $('#defaultOpen, #pano').removeClass('active');
158  })
159
160  // Change popup title
161  //$('li.itemC').on('click', function(){
162  //var targetli = $(this),
163  // thisTitle = targetli.text();
164  // alert(thisTitle);
165  //});
166
167  // popup on click
168  $('.-opengaleryPopup').on('click', function () {
169    // var target = $(this),
170    //  title = target.find('.title').text();
171    // alert(title);
172    $('.galeryPopup').show();
173    //$('.sliderwide ').slick('refresh');
174    //$('.sliderGalery ').slick('refresh');
175    //$('.sliderGalery-nav ').slick('refresh');
176    //$('.navigation').addClass('navigation--fixed');
177    $('body').addClass('popup-open');
178  })
179
180  //close rentPopup
181  $('.galeryPopup__close').click(function () {
182    $('.galeryPopup').hide();
183    $('body').removeClass('popup-open');
184  })
185
186  // struktur organisasi - open member detail popup
187  $('.org-card').on('click', function () {
188    var $card = $(this);
189    $('#orgModalPhoto').attr('src', $card.data('orgPhoto')).attr('alt', $card.find('img').attr('alt'));
190    $('#orgModalName').text($card.data('orgName'));
191    $('#orgModalRole').text($card.data('orgRole'));
192    $('#orgModalDesc').html($card.find('.org-card__desc-source').html());
193    $('#orgModal').addClass('is-open');
194    $('body').addClass('popup-open');
195  })
196
197  $('#orgModal').on('click', '[data-org-modal-close]', function () {
198    $('#orgModal').removeClass('is-open');
199    $('body').removeClass('popup-open');
200  })
201
202  $(document).on('keyup', function (e) {
203    if (e.key === 'Escape') {
204      $('#orgModal').removeClass('is-open');
205      $('body').removeClass('popup-open');
206    }
207  })
208
209  // seacrh on click
210  $('.search').on('click', function () {
211    event.preventDefault();
212    event.stopPropagation();
213    $('.navSearch').show("slide");
214    $('#nav-toggle2').hide();
215  })
216
217  //close seacrh
218  $('.navSearch__close').click(function () {
219    $('.navSearch').hide();
220    $('#nav-toggle2').show();
221  })
222
223  // popup buletin
224  $('.-openBuletin').on('click', function () {
225    $('.buletinPopup').show();
226    if (screen.width < 768) {
227    }
228    else {
229
230    }
231  })
232  // popup buletin from header
233  $('.nav__list .-openBuletin').on('click', function () {
234    $('.buletinPopup').show();
235    if (screen.width < 768) {
236      $('.nav__list').toggle();
237      $('.search').toggle();
238        $('.navTrigger ').toggleClass('active');
239 
240    }
241    else {
242
243    }
244  })
245  $('.buletinPopup__content_close').click(function () {
246    $('.buletinPopup').hide();
247  })
248
249});
250
251$(document).mouseup(function (e) {
252  var searchBar = $('.navSearch');
253  //body click
254  if (!searchBar.is(e.target) // if the target of the click isn't the searchBar...
255    && searchBar.has(e.target).length === 0) // ... nor a descendant of the searchBar
256  {
257    searchBar.hide();
258    $('#nav-toggle2').show();
259  }
260});
261
262// Navigation
263(function ($) { // Begin jQuery
264  $(function () { // DOM ready
265    // If a link has a dropdown, add sub menu toggle.
266    $('nav ul li a:not(:only-child)').click(function (e) {
267      $(this).siblings('.nav__dropdown').toggle();
268      // Close one dropdown when selecting another
269      $('.nav__dropdown').not($(this).siblings()).hide();
270      e.stopPropagation();
271    });
272    // Clicking away from dropdown will remove the dropdown class
273    $('html').click(function () {
274      $('.nav__dropdown').hide();
275    });
276    // Toggle open and close nav styles on click
277    $('#nav-toggle').click(function () {
278      $('nav ul').slideToggle();
279      $('.search').slideToggle();
280      if ($('#nav-toggle').hasClass('active')) {
281        $('.nav__mobile').css('position', '');
282      } else {
283        $('.nav__mobile').css('position', 'fixed');
284      }
285    });
286
287    $('#nav-toggle2').click(function () {
288      $('.nav__listMain').toggleClass('active');
289    });
290    // Hamburger to X toggle
291    $('#nav-toggle').on('click', function () {
292      this.classList.toggle('active');
293    });
294    $('#nav-toggle2').on('click', function () {
295      this.classList.toggle('active');
296    });
297  }); // end DOM ready
298
299})(jQuery); // end jQuery
300
301// handle links with @href started with '#' only
302$(document).on('click', 'a[href^="#"]', function (e) {
303  // target element id
304  var id = $(this).attr('href');
305
306  // target element
307  var $id = $(id);
308  if ($id.length === 0) {
309    return;
310  }
311
312  // prevent standard hash navigation (avoid blinking in IE)
313  e.preventDefault();
314
315  // top position relative to the document
316  var pos = $id.offset().top;
317
318  // animated top scrolling
319  $('body, html').animate({ scrollTop: pos });
320});
321
322
323// custom Select
324$('select').each(function () {
325
326  // Cache the number of options
327  var $this = $(this),
328    numberOfOptions = $(this).children('option').length;
329
330  // Hides the select element
331  $this.addClass('s-hidden');
332
333  // Wrap the select element in a div
334  $this.wrap('<div class="select"></div>');
335
336  // Insert a styled div to sit over the top of the hidden select element
337  $this.after('<div class="styledSelect"></div>');
338
339  // Cache the styled div
340  var $styledSelect = $this.next('div.styledSelect');
341
342  // Show the first select option in the styled div
343  $styledSelect.text($this.children('option').eq(0).text());
344
345  // Insert an unordered list after the styled div and also cache the list
346  var $list = $('<ul />', {
347    'class': 'options'
348  }).insertAfter($styledSelect);
349
350  // Insert a list item into the unordered list for each select option
351  for (var i = 0; i < numberOfOptions; i++) {
352    $('<li />', {
353      text: $this.children('option').eq(i).text(),
354      rel: $this.children('option').eq(i).val(),
355      class: $this.children('option').eq(i).val()
356    }).appendTo($list);
357  }
358
359  // Cache the list items
360  var $listItems = $list.children('li');
361
362  // Show the unordered list when the styled div is clicked (also hides it if the div is clicked again)
363  $styledSelect.click(function (e) {
364    e.stopPropagation();
365    $('div.styledSelect.active').each(function () {
366      $(this).removeClass('active').next('ul.options').hide();
367    });
368    $(this).toggleClass('active').next('ul.options').toggle();
369  });
370
371  // Hides the unordered list when a list item is clicked and updates the styled div to show the selected list item
372  // Updates the select element to have the value of the equivalent option
373  $listItems.click(function (e) {
374    e.stopPropagation();
375    $styledSelect.text($(this).text()).removeClass('active');
376    $this.val($(this).attr('rel'));
377    $list.hide();
378    $this.trigger('change');
379    /* alert($this.val()); Uncomment this for demonstration! */
380  });
381
382  // Hides the unordered list when clicking outside of it
383  $(document).click(function () {
384    $styledSelect.removeClass('active');
385    $list.hide();
386  });
387});
388
389//tab menu
390function openMenu(evt, menuName) {
391  var i, pageMenu__content, pageMenu__item;
392  pageMenu__content = document.getElementsByClassName("pageMenu__content");
393  for (i = 0; i < pageMenu__content.length; i++) {
394    pageMenu__content[i].style.display = "none";
395  }
396  pageMenu__item = document.getElementsByClassName("pageMenu__item");
397  for (i = 0; i < pageMenu__item.length; i++) {
398    pageMenu__item[i].className = pageMenu__item[i].className.replace(" active", "");
399  }
400  document.getElementById(menuName).style.display = "block";
401  evt.currentTarget.className += " active";
402}
403
404
405
406// Get the element with id="defaultOpen" and click on it
407document.getElementById("defaultOpen").click();
408
409

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.