1;(function($) { 2 3 var BREAKPOINT_SM = 768; 4 5 Drupal.facetapi = Drupal.facetapi || {}; 6 7 Drupal.facetapi.makeCheckbox = function() { 8 var $link = $(this), 9 active = $link.hasClass('facetapi-active'); 10 11 if (!active && !$link.hasClass('facetapi-inactive')) { 12 // Not a facet link. 13 return; 14 } 15 16 // Derive an ID and label for the checkbox based on the associated link. 17 // The label is required for accessibility, but it duplicates information 18 // in the link itself, so it should only be shown to screen reader users. 19 var id = this.id + '--checkbox', 20 description = $link.find('.element-invisible').html(), 21 label = $('<label class="element-invisible" for="' + id + '">' + description + '</label>'), 22 checkbox = $('<input type="checkbox" class="facetapi-checkbox" id="' + id + '" />'), 23 // Get the href of the link that is this DOM object. 24 href = $link.attr('href'), 25 redirect = new Drupal.facetapi.Redirect(href); 26 27 checkbox.click(function (e) { 28 Drupal.facetapi.disableFacet($link.parents('ul.facetapi-facetapi-checkbox-links')); 29 redirect.gotoHref(); 30 }); 31 32 if (active) { 33 checkbox.attr('checked', true); 34 // Add the checkbox and label, hide the link. 35 $link.before(label).before(checkbox); 36 } 37 else { 38 $link.before(label).before(checkbox); 39 } 40 }; 41 42 Drupal.behaviors.IPEFix = { 43 attach: function (context) { 44 // Panels IPE optimization for floating columns. 45 if ($('.panels-ipe-display-container').length > 0) { 46 $('.panels-ipe-portlet-wrapper').each(function() { 47 var $wrapper = $(this); 48 var colClass = $(".panels-ipe-portlet-content > div[class^='col col-']", $wrapper).attr('class'); 49 $wrapper.addClass(colClass); 50 $(".panels-ipe-portlet-content > div[class^='col col-']", $wrapper).removeClass(); 51 }); 52 } 53 } 54 }; 55 56 Drupal.behaviors.trainingForm = { 57 attach: function (context) { 58 // Panels IPE optimization for floating columns. 59 if ($('.field-name-project-ds-registration form').length > 0) { 60 var $form = $('.field-name-project-ds-registration form'); 61 // Copy name. 62 $('.webform-component--memberinfo table tr:first-child .form-item-submitted-memberinfo-1-3 input', $form).on('blur', function() { 63 if (!$('.webform-component--naam-contact input', $form).val()) { 64 $('.webform-component--naam-contact', $form).addClass('form-item-not-empty'); 65 $('.webform-component--naam-contact input', $form).val($(this).val()); 66 } 67 }); 68 69 // Copy firstname. 70 $('.webform-component--memberinfo table tr:first-child .form-item-submitted-memberinfo-1-2 input', $form).on('blur', function() { 71 if (!$('.webform-component--voornaam-contact input', $form).val()) { 72 $('.webform-component--voornaam-contact', $form).addClass('form-item-not-empty'); 73 $('.webform-component--voornaam-contact input', $form).val($(this).val()); 74 } 75 }); 76 77 // Copy email. 78 $('.webform-component--memberinfo table tr:first-child .form-item-submitted-memberinfo-1-4 input', $form).on('blur', function() { 79 if (!$('.webform-component--e-mail input', $form).val()) { 80 $('.webform-component--e-mail', $form).addClass('form-item-not-empty'); 81 $('.webform-component--e-mail input', $form).val($(this).val()); 82 } 83 }); 84 85 // Copy phone. 86 $('.webform-component--memberinfo table tr:first-child .form-item-submitted-memberinfo-1-5 input', $form).on('blur', function() { 87 if (!$('.webform-component--telefoon-contact input', $form).val()) { 88 $('.webform-component--telefoon-contact', $form).addClass('form-item-not-empty'); 89 $('.webform-component--telefoon-contact input', $form).val($(this).val()); 90 } 91 }); 92 } 93 } 94 }; 95 96 Drupal.behaviors.Forms = { 97 attach: function (context) { 98 99 // Form optimizations. 100 // Label as placeholder. 101 $('input.form-text').each(function() { 102 var $this = $(this); 103 inputClasses($this); 104 105 if ($this.parent().parent('.date-padding').length == 0) { 106 $this.on('keyup keydown change', function() { 107 inputClasses($(this)); 108 }); 109 $this.on('focus', function() { 110 $(this).parents('.form-item').addClass('form-item-focus'); 111 }); 112 $this.on('blur', function() { 113 $(this).parents('.form-item').removeClass('form-item-focus'); 114 inputClasses($(this)); 115 }); 116 } 117 // Exception for date fields. 118 else { 119 inputClasses($this); 120 $this.on('keyup keydown change', function() { 121 inputClasses($(this)); 122 }); 123 } 124 }); 125 126 // Open filter dropdown. 127 $('.view-koren .views-exposed-widget label').on('click', function () { 128 var openDropdown = $('.view-koren .views-exposed-widget.open'); 129 var target = $(this).parent(); 130 if (target.hasClass('open')) { 131 target.removeClass('open'); 132 } 133 else { 134 openDropdown.removeClass('open'); 135 target.addClass('open'); 136 } 137 }); 138 139 // Open filter dropdown. 140 $('.view-koren .form-checkboxes.split-primary').each(function () { 141 var primaryCount = $('input', this).eq(0).data('primary-count'); 142 if (primaryCount) { 143 $('.form-type-bef-checkbox', this).eq(primaryCount).before('<a class="toggle-more-options">Meer trefwoorden</a>'); 144 $('.form-type-bef-checkbox', this).eq(primaryCount).nextAll().andSelf().wrapAll('<div class="more-options"/>'); 145 $('.toggle-more-options').on('click', function () { 146 $(this).next('.more-options').toggleClass('open'); 147 $(this).hide(); 148 return false;
149 }); 150 } 151 }); 152 153 // Date popup fix. 154 $('.form-type-date-popup label').on('click', function() { 155 $(this).next('.date-padding').find('input').focus().click(); 156 }); 157 if ($('.invoice-container').length > 0) { 158 $('.form-type-date-popup input').on('focus', function() { 159 $(this).datepicker("show"); 160 }); 161 } 162 } 163 }; 164 165 Drupal.behaviors.backToTop = { 166 attach: function (context, settings) { 167 168 // Show or hide button to scroll to the top of a page. 169 var $button = $(".back-to-top"); 170 $(window).on('scroll', function () { 171 if ($(window).scrollTop() > 200) { 172 $button.fadeIn(); 173 } 174 else { 175 $button.fadeOut(); 176 } 177 }); 178 179 $button.on("click", function () { 180 return $('html, body').animate({ 181 scrollTop:0},800 182 ); 183 }) 184 } 185 }; 186 187 Drupal.behaviors.stickyMap = { 188 attach: function (context, settings) { 189 190 if ($('.map-wrapper').length > 0) { 191 checkMap(); 192 193 $(window).on('scroll resize', function () { 194 checkMap(); 195 }); 196 } 197 } 198 }; 199 200 201 Drupal.behaviors.stickyJumpLinks = { 202 attach: function (context, settings) { 203 204 // Show or hide button to scroll to the top of a page. 205 var $bar = $(".pane-bundle-jump-links .field-name-jump-links"); 206 if ($bar.length > 0) { 207 $(window).on('scroll', function () { 208 if ($(".pane-bundle-jump-links .fieldable-panels-pane ").offset().top - $(window).scrollTop() < $('header').outerHeight()) { 209 $bar.addClass('sticky'); 210 $('header').addClass('no-shadow'); 211 } 212 else { 213 $bar.removeClass('sticky'); 214 $('header').removeClass('no-shadow'); 215 } 216 }); 217 } 218 219 } 220 }; 221 222 223 $(window).on('load', function() { 224 225 // Solution for anchor links when the header is sticky at the top of the page. 226 var anchorOffset = 110;//$('header').outerHeight(true); 227 228 if ($(".pane-bundle-jump-links").length > 0) { 229 anchorOffset += parseInt($(".pane-bundle-jump-links .field-name-jump-links").outerHeight(true)); 230 } 231 if ($("#navbar-administration").length > 0) { 232 anchorOffset += parseInt($('#navbar-bar').outerHeight(true) + $('#navbar-tray').outerHeight(true)); 233 } 234 if (window.location.hash) { 235 var hash = window.location.hash; 236 237 var $target = $(hash); 238 if ($target.length) { 239 setTimeout(function() { 240 $('html, body').animate({scrollTop: parseInt($target.offset().top) - anchorOffset}, 800); 241 }, 10); 242 } 243 } 244 245 $(window).on('hashchange', function(e){ 246 e.preventDefault(); 247 var $target = $(location.hash); 248 if ($target.length) { 249 $('html, body').animate({scrollTop: parseInt($target.offset().top) - anchorOffset}, 800); 250 } 251 }); 252 253 $('a[href*="#"]').on('click',function (e) { 254 255 if (this.pathname == window.location.pathname && 256 this.protocol == window.location.protocol && 257 this.host == window.location.host) { 258 var target = this.hash; 259 if (target != '' && $(target).length) { 260 e.preventDefault(); 261 //$(window).scrollTop(parseInt($(target).offset().top) - anchorOffset); 262 //window.location.hash = this.hash; 263 264 // Get some heights 265 var anchorOffset = $('header').outerHeight(true); 266 if ($(".pane-bundle-jump-links").length > 0) { 267 anchorOffset += parseInt($(".pane-bundle-jump-links .field-name-jump-links").outerHeight(true)); 268 } 269 if ($("#navbar-administration").length > 0) { 270 anchorOffset += $('#navbar-bar').outerHeight(true) + $('#navbar-tray').outerHeight(true); 271 } 272 273 var target = this.hash; 274 var $target = $(target); 275 276 $('html, body').stop().animate({ 277 scrollTop: (parseInt($target.offset().top) - parseInt(anchorOffset)) 278 }, 600, 'swing'); 279 280 281 } 282 } 283 }); 284 }); 285 286 $(document).ready(function() { 287 288 // Doewap form custom fix. 289 var doewapForm = $('#webform-client-form-5449'); 290 if (doewapForm.length > 0) { 291 if ($('input[name="details[page_num]"]', doewapForm).val() > 1) { 292 293 // Get height of header bars. 294 var anchorOffset = $('header').outerHeight(true); 295 if ($(".pane-bundle-jump-links").length > 0) { 296 anchorOffset += parseInt($(".pane-bundle-jump-links .field-name-jump-links").outerHeight(true)); 297 } 298 if ($("#navbar-administration").length > 0) { 299 anchorOffset += $('#navbar-bar').outerHeight(true) + $('#navbar-tray').outerHeight(true); 300 } 301 302 // Scroll to top of form. 303 $('html, body').stop().animate({ 304 scrollTop: (parseInt(doewapForm.offset().top) - parseInt(anchorOffset)) 305 }, 600, 'swing'); 306 } 307 } 308 309 // Doewap form custom fix. 310 $('.webform-progressbar').each(function(item) { 311 var form = $(this).parents('form'); 312 313 if (form.length > 0) { 314 if ($('input[name="details[page_num]"]', form).val() > 1) { 315 316 // Get height of header bars. 317 var anchorOffset = $('header').outerHeight(true); 318 if ($(".pane-bundle-jump-links").length > 0) { 319 anchorOffset += parseInt($(".pane-bundle-jump-links .field-name-jump-links").outerHeight(true)); 320 } 321 if ($("#navbar-administration").length > 0) { 322 anchorOffset += $('#navbar-bar').outerHeight(true) + $('#navbar-tray').outerHeight(true); 323 } 324 325 // Scroll to top of form. 326 $('html, body').stop().animate({ 327 scrollTop: (parseInt(form.offset().top) - parseInt(anchorOffset)) 328 }, 600, 'swing'); 329 } 330 } 331 332 }); 333 334 335 if ($('.tablesorter').length > 0) { 336 $(".tablesorter").tablesorter({ 337 sortList: [[0,1]] 338 } 339 ); 340 } 341 342 // FAQ. 343 $('.pane-bundle-faq .field-collection-item-field-qa, .field-name-field-qa .field-collection-item-field-qa').each(function() { 344 $('h3', this).on('click', function() { 345 $(this).parent().toggleClass('open'); 346 }) 347 }); 348 349 // Mobile navigation support. 350 if ($('.mobile-menu').length > 0) { 351 // Add the navigation toggle. 352 $('.mobile-menu .pane-title').click(function(e) { 353 $('header .search-toggle').removeClass('open'); 354 $('.header .pane-pane-search').removeClass('open'); 355 $(this).parent().toggleClass('open'); 356 357 if ($(this).parent().hasClass('open')) { 358 $(this).html('<i class="fa fa-close"></i> ' + Drupal.t('Close')); 359 } 360 else { 361 $(this).html('Menu'); 362 } 363 return false;
364 }); 365 } 366 if ($('.pane-mobile-menu-ecj').length > 0) { 367 // Add the navigation toggle. 368 $('.pane-mobile-menu-ecj .pane-title').click(function(e) { 369 $('header .search-toggle').removeClass('open'); 370 $('.header .pane-pane-search').removeClass('open'); 371 $(this).parent().toggleClass('open'); 372 373 if ($(this).parent().hasClass('open')) { 374 $(this).html('<i class="fa fa-close"></i> ' + Drupal.t('Close')); 375 } 376 else { 377 $(this).html('Menu'); 378 } 379 return false; 380 }); 381 } 382 383 // Agenda date range 384 var $dateRangeForm = $('aside #project-date-form') 385 if ($('.error', $dateRangeForm).length == 0 && !$('a.range').hasClass('activedate')) { 386 $dateRangeForm.hide(); 387 } 388 $('aside .range').on('click', function (e) { 389 if (!$(this).hasClass('activedate')) { 390 e.preventDefault(); 391 $dateRangeForm.slideToggle(); 392 } 393 }); 394 $('.form-item-startdate-date input', $dateRangeForm).on('change', function() { 395 // Split up the date 396 var datePieces = $(this).val().split('-'); 397 // Force the departure date to be later than the arrival date. 398 var minDate = new Date(datePieces[2], datePieces[1] - 1, datePieces[0]); 399 $('.form-item-enddate-date input', $dateRangeForm).datepicker("destroy"); 400 $(".form-item-enddate-date input", $dateRangeForm).datepicker({ 401 minDate: minDate, 402 dateFormat: 'dd-mm-yy', 403 defaultDate: minDate 404 }); 405 $(".form-item-enddate-date input", $dateRangeForm).datepicker("setDate", minDate); 406 $(".form-item-enddate-date, .form-item-enddate", $dateRangeForm).addClass('form-item-not-empty'); 407 }); 408 409 // Masonry layout 410 $('.masonry').masonry({ 411 // options... 412 itemSelector: '.node', 413 columnWidth: '.node', 414 percentPosition: true, 415 gutter: 20 416 }); 417 418 if ($('body').hasClass('node-type-training')) { 419 if ($(window).width() >= BREAKPOINT_SM) { 420 // Min height on training. 421 trainingMinHeight(); 422 $(window).resize(function() { 423 trainingMinHeight(); 424 }); 425 } 426 427 // Toggle days on training 428 $('#days').on('click', function() { 429 $(this).toggleClass('open'); 430 $('.arrow-link', this).toggleClass('arrow-link-up'); 431 trainingMinHeight(); 432 }); 433 } 434 435 // Toggle prices on events 436 $('.prices-extra').on('click', function() { 437 $(this).toggleClass('open'); 438 $('.arrow-link', this).toggleClass('arrow-link-up'); 439 return false; 440 }); 441 442 /*if ($('.swiper-container.horizontal-squares').length > 0) { 443 var swiper = new Swiper('.swiper-container.horizontal-squares', { 444 slidesPerView: 4, 445 spaceBetween: 20, 446 slidesPerGroup: 4, 447 navigation: { 448 nextEl: '.swiper-button-next', 449 prevEl: '.swiper-button-prev' 450 }, 451 breakpoints: { 452 // when window width is <= 480px 453 480: { 454 slidesPerView: 1, 455 slidesPerGroup: 1, 456 }, 457 768: { 458 slidesPerView: 2, 459 slidesPerGroup: 2, 460 }, 461 992: { 462 slidesPerView: 2, 463 slidesPerGroup: 2, 464 }, 465 1200: { 466 slidesPerView: 3, 467 slidesPerGroup: 3, 468 } 469 } 470 }); 471 }*/ 472 473 if ($('.swiper-container.horizontal-squares').length > 0) { 474 $('.swiper-container.horizontal-squares').each(function(index) { 475 var width = parseInt($(this).data('swiper-columns')); 476 $(this).addClass('swiper-instance-' + index); 477 window['swiper' + index] = new Swiper('.swiper-instance-' + index, { 478 slidesPerView: width, 479 spaceBetween: 20, 480 slidesPerGroup: width, 481 navigation: { 482 nextEl: '.swiper-button-next', 483 prevEl: '.swiper-button-prev' 484 }, 485 breakpoints: { 486 // when window width is <= 480px 487 480: { 488 slidesPerView: 1, 489 slidesPerGroup: 1, 490 }, 491 768: { 492 slidesPerView: 2, 493 slidesPerGroup: 2, 494 }, 495 992: { 496 slidesPerView: 2, 497 slidesPerGroup: 2, 498 }, 499 1200: { 500 slidesPerView: width, 501 slidesPerGroup: width, 502 } 503 } 504 }); 505 }) 506 } 507 508 // Top alert close. 509 if ($('.top-alert').length > 0) { 510 var hideAlert = $.cookie('__alert'); 511 if (hideAlert != 'true') { 512 $('.top-alert').show(); 513 $('body').addClass('top-alert-visible'); 514 } 515 516 $('.top-alert-close').on('click', function() { 517 $('.top-alert').hide(); 518 $('body').removeClass('top-alert-visible'); 519 $.cookie('__alert', true, { expires: (3) }); 520 }); 521 } 522 523 // Flipper height. 524 if ($('.flipper').length > 0) { 525 $('.flipper').each(function( index ) { 526 $this = $(this); 527 // Get max height. 528 $frontHeight = $('.front', $this).height(); 529 $backHeight = $('.back', $this).height(); 530 $height = Math.max($frontHeight, $backHeight); 531 532 // Set height. 533 $this.height($height); 534 $this.parent('.flipper-container').height($height); 535 $('.front', $this).height($height); 536 $('.back', $this).height($height); 537 }); 538 $('.flipper-container .front .field-name-field-basic-image-image') 539 .mouseenter(function() { 540 $(this).parents('.flipper').addClass('hover'); 541 }); 542 $('.flipper-container') 543 .mouseleave(function() { 544 $('.flipper', this).removeClass('hover'); 545 }); 546 } 547 548 // Search toggle. 549 $('header .search-toggle').on('click', function() { 550 var toggle = $(this); 551 var searchBlock = $('.header .pane-pane-search'); 552 searchBlock.toggleClass('open'); 553 toggle.toggleClass('open'); 554 if (toggle.hasClass('open')) { 555 $('.mobile-menu .pane-inner').removeClass('open'); 556 $('.form-text', searchBlock).focus(); 557 $('body').on('click', function(e) { 558 if (!searchBlock.is(e.target) && searchBlock.has(e.target).length === 0) { 559 toggle.removeClass('open'); 560 $(searchBlock).removeClass('open'); 561 } 562 }); 563 } 564 return false;
565 }); 566 567 // Popup in image block. 568 $('.popup-link').magnificPopup({ 569 type: 'image', 570 image: { 571 tError: '<a href="%url%">De afbeelding #%curr%</a> kon niet geladen worden.', 572 verticalFit: false, 573 titleSrc: function(item) { 574 return item.el.parent().find('.popup-caption').html(); 575 } 576 } 577 }); 578 579 // Popup FPP. 580 if ($('.pane-bundle-popup').length > 0) { 581 var content = '<div id="newsletter-modal" class="newsletter-modal">' + $('.pane-bundle-popup .fieldable-panels-pane').html() + '</div>'; 582 583 setTimeout(function () { 584 $.magnificPopup.open({ 585 items: { 586 src: content 587 }, 588 type: 'inline', 589 closeBtnInside: true, 590 mainClass: 'my-mfp-zoom-in' 591 }); 592 }, 593 1500); 594 } 595 596 597 // Sticky header. 598 stickyHeader(); 599 $(window).on('scroll', function() { 600 stickyHeader(); 601 }) 602 603 // Sticky footer 604 stickyFooter(); 605 $(window).resize(function() { 606 stickyFooter(); 607 }); 608 609 // Mobile filters. 610 if ($('.filter').length > 0) { 611 mobileFilters(); 612 // This is an issue on Android. 613 /*$(window).resize(function () { 614 mobileFilters(); 615 });*/ 616 } 617 618 // Newsletter popup 619 newsletterPopup(); 620 621 }); 622 623 // Ajax loader on facets. 624 $('.facetapi-facetapi-checkbox-links a, .facetapi-facetapi-checkbox-links input, .pane-pane-date-filter .form-submit, .remove-filter').on('click', function () { 625 $('body').prepend('<div class="loader"></div>'); 626 }); 627 $('.pane-pane-date-filter a').on('click', function () { 628 if ($(this).hasClass('range') && !$(this).hasClass('activedate')) { 629 return false; 630 } 631 $('body').prepend('<div class="loader"></div>'); 632 }); 633 634 function stickyFooter() { 635 var skipPages = ['vind-een-koor']; 636 if (skipPages.indexOf(window.location.pathname) == -1) { 637 $('body').css('padding-bottom', $('footer').outerHeight()); 638 } 639 } 640 641 // Show a newsletter popup after 30 seconds for anonymous users. 642 function newsletterPopup() { 643 // Only popup if user is not logged in. 644 if ($('body.logged-in').length == 0) { 645 646 // Check for the cookie if the popup has already been shown. 647 var popupShown = $.cookie('__popup'); 648 649 // Print the modal if both conditions apply 650 if (popupShown !== 'true' && $('.pane-newsletter-subscription-popup').length > 0) { 651 652 // Make an exception for these pages 653 var skipPages = []; 654 if (skipPages.indexOf(window.location.pathname) == -1) { 655 // Get the popup content 656 document.onmousemove = function(e) { 657 658 // Are we leaving the site area and has the cook not been set in meantime? 659 if (e.clientY <= 5 && $.cookie('__popup') !== 'true') { 660 var pane = $('.pane-newsletter-subscription-popup').clone().wrap('<div></div>').parent(); 661 $('.captcha', pane).html(''); 662 var content = '<div id="newsletter-modal" class="newsletter-modal">' + pane.html()+ '</div>'; 663 664 setTimeout(function () { 665 $.magnificPopup.open({ 666 items: { 667 src: content 668 }, 669 type: 'inline', 670 closeBtnInside: true, 671 mainClass: 'my-mfp-zoom-in' 672 }); 673 $.cookie('__popup', true, { expires: (30) }); 674 Drupal.attachBehaviors(); 675 }, 676 500); 677 678 } 679 } 680 } 681 } 682 } 683 } 684 685 686 // toggle empty classes on input fields. 687 function inputClasses(input) { 688 if (input.val() != '') { 689 input.parents('.form-item').addClass('form-item-not-empty'); 690 } 691 else { 692 input.parents('.form-item').removeClass('form-item-not-empty'); 693 } 694 if (input.next('.value-prefix').length > 0) { 695 input.parents('.form-item').addClass('has-value-prefix'); 696 } 697 if (input.next('.value-suffix').length > 0) { 698 input.parents('.form-item').addClass('has-value-suffix'); 699 } 700 } 701 702 // Set min height on content area on training 703 function trainingMinHeight() { 704 var minHeight = $('.detail-aside').height() - $('.detail-header').height(); 705 $('.detail-content').css('min-height', minHeight); 706 } 707 708 // Hide the filters on mobile devices so save some place. 709 function mobileFilters() { 710 var $filters = $('aside .filter'); 711 712 if ($(window).width() < 768) { 713 $filters.hide(); 714 var scope = $filters.parent(); 715 716 717 if ($('.show-filters', scope).length == 0) { 718 $(scope).prepend('<div class="col col-sm-12"><a class="show-filters" href="#"><i class="fa fa-arrow-down"></i> Filters tonen</a></div>'); 719 $(scope).append('<div class="col col-sm-12"><a class="hide-filters" href="#" style="display: none"><i class="fa fa-arrow-up"></i> Filters verbergen</a></div>'); 720 721 $('.show-filters').click(function() { 722 723 $filters.show(); 724 $(this).hide(); 725 $('.hide-filters', scope).show(); 726 return false;
727 }); 728 729 $('.hide-filters').click(function() { 730 $filters.hide(); 731 $(this).hide(); 732 $('.show-filters', scope).show(); 733 return false; 734 }); 735 } 736 } 737 else { 738 $('aside .show-filters, aside .hide-filters').remove(); 739 $filters.show(); 740 741 } 742 } 743 744 // Toggle Sticky header class. 745 function stickyHeader() { 746 if ($(window).scrollTop() > 65) { 747 if (!$('body').hasClass('scrolling')) { 748 $('body').addClass('scrolling'); 749 } 750 } 751 else { 752 $('body').removeClass('scrolling'); 753 } 754 } 755 756 function checkMap() { 757 var map = $('#map'); 758 var headerHeight = $('header').outerHeight(); 759 760 if ($(window).scrollTop() >= headerHeight) { 761 map.addClass('sticky'); 762 } 763 else { 764 map.removeClass('sticky'); 765 } 766 } 767 768 769})(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.