PageSourceSearch

https://www.medicalteams.org/wp-content/themes/mti-theme-2021/dist/scripts/Custom-NEW.js?ver=20230808

js medicalteams.org collected 2026-10-02 04:01:45 UTC 3,296 bytes, 55 lines download raw bytes

1// Desktop Search Form
2
3jQuery(document).ready(function (e) { "use strict"; function s() { } function n(s) { !0 === s ? (e(".searchform--header").addClass("is-open"), e(".searchform__button").addClass("close")) : (e(".searchform--header").removeClass("is-open"), e(".searchform__button").removeClass("close")) } !function () { e(".menu.menu--social").find("li").find("a").each(function () { e(this).attr("target", "_blank") }) }(); var c = !1; e(window).resize(function () { !1 !== c && clearTimeout(c), c = setTimeout(s, 200) }).resize(), e(".alert-close.js-close").click(function (s) { e(this).parent().parent().delay(100).fadeOut(300), s.preventDefault() }); var o = e(".searchform"); e(".search__icon").on("click", function () { o.submit() }), e(".close__icon").on("click", function () { n(!1) }), e(".mega-menu-item-10546 a").click(function (e) { n(!0), e.preventDefault() }), e(".searchform__button").click(function (s) { e(this).hasClass("close") && (n(!1), s.preventDefault()) }), e(".searchform--header").keypress(function (s) { 13 === s.which && e(this).submit() }), e(".searchform--header.is-open").click(function (e) { e.stopPropagation() }), e(document).scroll(function () { e(this).scrollTop() > 170 ? e(".l-header").addClass("is-scrolling") : e(".l-header").removeClass("is-scrolling") }) });
4
5//Add fancybox lightbox to gallery images
6//     jQuery(document).ready(function(){
7//         jQuery(".gallery-item div a").attr('data-fancybox', 'gallery').addClass('fancybox');
8//     }       
9//     )
10
11// Fancybox for WP Gallery
12
13jQuery(document).ready(function () {
14    jQuery(".gallery-item div a").attr('data-fancybox', 'gallery').attr('data-animation-effect', 'false').addClass('fancybox')
15    jQuery(".gallery-item").each(function () {
16        var caption = jQuery(this).find("figcaption").text()
17        jQuery(this).find("div a").attr('data-caption', caption);
18    });
19    // Guard against fancybox not being loaded
20    if (typeof jQuery.fancybox !== 'undefined') {
21        jQuery.fancybox.defaults.preventCaptionOverlap = "true";
22        jQuery.fancybox.defaults.clickContent = "zoom : false"
23    }
24});
25
26// Replace Desktop Search with Mobile Search Form
27
28var mobileSearchForm = "<form class='search-form searchform' role='search' method='get'  action='/'><label for='header-search-input-mobile' class='sr-only'>Search</label><input class='searchform__input' id='header-search-input-mobile' type='search' name='s' placeholder='To search, type and hit enter.'><button class='searchform__button' type='submit' role='button' title='Search'><i class='fas fa-search'></i></button><div class='search__controls'><div class='search__icon'></div><div class='close__icon'></div></div></form>";
29
30jQuery(document).ready(function () {
31    jQuery("div.mobile-menu__bar > .mega-menu-wrap > ul > li#mega-menu-item-10546 a").replaceWith(mobileSearchForm);
32})
33
34jQuery(document).ready(function($){
35	let currentPage = 1;
36	$('#load-more').on('click', function() {
37  	currentPage++; // Do currentPage + 1, because we want to load the next page
38
39  $.ajax({
40    type: 'POST',
41    url: '/wp-admin/admin-ajax.php',
42    dataType: 'html',
43    data: {
44      action: 'news_load_more',
45      paged: currentPage,
46    },
47    success: function (res) {
48
49      $('.news-list').append(res);
50
51    }
52  });
53});
54});
55

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.