PageSourceSearch

https://www.vetsurgeryonline.com/wp-content/themes/uofg-theme/js/uofg.js?ver=20

js vetsurgeryonline.com collected 2026-09-29 14:05:39 UTC 3,744 bytes, 122 lines download raw bytes

1'use strict';
2
3( function($) {
4	'use strict';
5	jQuery.easing.def = 'easeInOutQuad';
6	$( '.header-nav > ul > .parent > a' ).click( function( e ) {
7		e.preventDefault();
8		
9		if($( this ).attr('aria-expanded') == 'true') {
10			$( this ).attr('aria-expanded', 'false');
11		}
12		else {
13			$( this ).attr('aria-expanded', 'true');
14		}
15		
16		$( this ).parent().siblings('.open').find( 'a[aria-expanded="true"]' ).attr('aria-expanded', 'false');
17
18		$( this ).parent().siblings('.open').removeClass( 'open' ).find( '.sub-nav' ).fadeOut();
19		$( this ).parent().toggleClass( 'open' );
20		$( this ).parent().find( '.sub-nav' ).fadeToggle();
21
22		if($( this ).parent().hasClass('open')) {
23			var item_offset = $( this ).offset();
24
25			var subnav_width = $( this ).parent().find( '.sub-nav' ).width();
26			if(item_offset.left + subnav_width > $(window).width()) {
27				$( this ).parent().addClass('open-right');
28			}
29		}
30	} );
31	$( window ).on( 'resize', function(){
32		var open_menu_item = $( '.header-nav > ul > .open' );
33		if(open_menu_item.length) {
34			var item_offset = open_menu_item.find('a').offset();
35
36			var subnav_width = open_menu_item.find( '.sub-nav' ).width();
37			if(item_offset.left + subnav_width > $(window).width()) {
38				open_menu_item.addClass('open-right');
39			}
40			else {
41				open_menu_item.removeClass('open-right');
42			}
43		}
44	});
45	$( '.header-mobile-nav-content > ul > .parent > a' ).click( function( e ) {
46		e.preventDefault();
47
48		if($( this ).attr('aria-expanded') == 'true') {
49			$( this ).attr('aria-expanded', 'false');
50		}
51		else {
52			$( this ).attr('aria-expanded', 'true');
53		}
54
55		$( this ).parent().toggleClass( 'open' );
56		$( this ).parent().find( '.sub-nav' ).toggle();
57	} );
58	$( '.header-mobile-menu' ).click( function( e ) {
59		e.preventDefault();
60
61		if($( this ).attr('aria-expanded') == 'true') {
62			$( this ).attr('aria-expanded', 'false');
63			$( '#header-mobile-nav' ).removeClass('open');
64		}
65		else {
66			$( this ).attr('aria-expanded', 'true');
67			$( '#header-mobile-nav' ).addClass('open');
68		}
69	} );
70
71	$( '.header-control--play-pause' ).click( function( e ) {
72		var slider = $('.header-slideshow');
73		if(slider.is( '.cycle-paused' )) {
74			$('.header-slideshow').cycle('resume');
75		}
76		else {
77			$('.header-slideshow').cycle('pause');
78		}
79	} );
80
81	//Sets current slide indicator
82	$( '.header-slideshow' ).on( 'cycle-after cycle-post-initialize', function( event, opts ) {
83		$( '.header-pager .current-indicator' ).remove();
84		if($( '.header-pager .cycle-pager-active button' ).length) {
85			var target = $( '.header-pager .cycle-pager-active button' );
86		}
87		else {
88			var target = $( '.header-pager li:first-child button' );
89		}
90		target.append('<span class="current-indicator sr-only"> (Current Slide)</span>');
91		
92	});
93	$( '.slider-holder button, .slider-holder a' ).on( 'focus', function( event, opts ) {
94		var slider_focus = true;
95		$(window).keyup(function (e) {
96			var code = (e.keyCode ? e.keyCode : e.which);
97			if (code == 9 && slider_focus) {
98				console.log('test');
99				$('.header-slideshow').cycle('pause');
100				slider_focus = false;
101			}
102		});
103	});
104
105	$( '.header-slideshow' ).on( 'cycle-paused', function( event, opts ) {
106		var slider = $('.slider-holder');
107
108		slider.find('.play-pause-holder').removeClass('playing');
109		slider.find('.play-pause-holder .play-text').show();
110		slider.find('.play-pause-holder .pause-text').hide();
111	});
112
113	$( '.header-slideshow' ).on( 'cycle-resumed', function( event, opts ) {
114		var slider = $('.slider-holder');
115		
116		slider.find('.play-pause-holder').addClass('playing');
117		slider.find('.play-pause-holder .play-text').hide();
118		slider.find('.play-pause-holder .pause-text').show();
119	});
120
121	$( 'p > a:not(.disable-hover) > img' ).parent().addClass('disable-hover');
122} ) (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.