PageSourceSearch

https://www.zoloft.com/-/media/Themes/Common/ZoloftCom/ZoloftCom/Scripts/ada-theme.js

js zoloft.com collected 2026-09-24 20:04:47 UTC 6,721 bytes, 203 lines download raw bytes

1// Ciber 2021 Version For ADA Compliance
2var $ = jQuery.noConflict();
3function fontIncrease() {
4	$(document).on("click", ".fontScaler", function (n) {
5		$(this).siblings().removeClass("current");
6		$(this).addClass("current");
7		$(this).hasClass("current") && n.preventDefault();
8		if ($(this).hasClass("smallFont")) {
9			$("html").removeClass("plusOne").addClass("minusOne");
10		}
11		if ($(this).hasClass("normalFont")) {
12			$("html").removeClass("plusOne , minusOne");
13		}
14		if ($(this).hasClass("largeFont")) {
15			$("html").removeClass("minusOne").addClass("plusOne");
16		}
17	});
18}
19
20function skipTocontent() {
21	$('#skiptocontent').bind('click.smoothscroll', function (e) {
22        //e.preventDefault();
23        var target = this.hash,
24			$target = $(target);
25        $('html, body').stop().animate({
26            'scrollTop': $target.offset().top
27        }, 500, 'swing', function () {
28			window.location.hash = target;
29        });
30		return false;
31    });
32}
33
34function contrastColor() {
35	$(document).on("click", ".contrastChanger", function () {
36		if ($(this).hasClass("wob")) {
37			$("body").removeClass("normal");
38			$("body").addClass("wob");
39			sessionStorage.setItem("currentSessionItem", "wob");
40		}
41		if ($(this).hasClass("normal")) {
42			$("body").removeClass("wob");
43			$("body").addClass("normal");
44			sessionStorage.setItem("currentSessionItem", "normal");
45		}
46	})
47}
48
49function keyboardAssesibility() {
50	$('#nav li').keyup(function (e) {
51		//console.log('keyup called');
52		var code = e.keyCode || e.which;
53		var $this = $(this);
54		if (code == '9') {
55			//alert('Tab pressed');
56			$(this).siblings('li').find('.subnav-hover').stop().slideUp(0)
57			$(this).children('.subnav-hover').stop().slideDown();
58		}
59	});
60}
61
62function trapFocus(className) {
63	const focusableElements = 'button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
64	var exitPop = document.querySelector('.'+className); // select the exitPop by it's id OR class
65	
66	const firstFocusableElement = exitPop.querySelectorAll(focusableElements)[0]; // get first element to be focused inside exitPop
67	
68	const focusableContent = exitPop.querySelectorAll(focusableElements);
69	
70	const lastFocusableElement = focusableContent[focusableContent.length - 1]; // get last element to be focused inside exitPop
71	
72	
73	document.addEventListener('keydown', function (e) {
74		let isTabPressed = e.key === 'Tab' || e.keyCode === 9;
75		if (!isTabPressed) {
76			return;
77			console.log('return');
78		}
79		if (e.shiftKey) { // if shift key pressed for shift + tab combination
80			if (document.activeElement === firstFocusableElement) {
81				lastFocusableElement.focus();
81 // add focus for the last focusable element
82				e.preventDefault();
83			}
84		} else { // if tab key is pressed
85			if (document.activeElement === lastFocusableElement) { // if focused has reached to last focusable element then focus first focusable element after pressing tab
86				firstFocusableElement.focus(); // add focus for the first focusable element
87				e.preventDefault();
88			}
89		}
90	});
91}
92
93/*function sinupFormTrapFocus(className) {
94	const focusableElements = 'button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
95	var exitPop = document.querySelector('.'+className); // select the exitPop by it's id OR class
96	
97	const firstFocusableElement = exitPop.querySelectorAll(focusableElements)[0]; // get first element to be focused inside exitPop
98	
99	const focusableContent = exitPop.querySelectorAll(focusableElements);
100	
101	const lastFocusableElement = focusableContent[focusableContent.length - 1]; // get last element to be focused inside exitPop
102	
103	
104	document.addEventListener('keydown', function (e) {
105		let isTabPressed = e.key === 'Tab' || e.keyCode === 9;
106		if (!isTabPressed) {
107			return;
108		}
109		if (e.shiftKey) { // if shift key pressed for shift + tab combination
110			if (document.activeElement === firstFocusableElement) {
111				lastFocusableElement.focus();
111 // add focus for the last focusable element
112				e.preventDefault();
113			}
114		} else { // if tab key is pressed
115			if (document.activeElement === lastFocusableElement) { // if focused has reached to last focusable element then focus first focusable element after pressing tab
116				firstFocusableElement.focus(); // add focus for the first focusable element
117				e.preventDefault();
118			}
119		}
120	});
121}*/
122
123function resizeIsi() {
124	$('.collapse-resize-isi-icon').focus();
125}
126
127function collapsableResizeIsi() {
128	console.log("");
129}
130
131$(document).ready(function () {
132	//firstFocusableElement.focus();
133	skipTocontent();
134	fontIncrease();
135	contrastColor();
136	keyboardAssesibility();
137	 
138	$('.interstitial .right .interstitial-anchor').on('keydown', function (e) {
139		trapFocus('external-interstitial');
140	});
141	
142	$('#signup-form-load #PopUpFormRequest #PFirstName').on('keydown', function (e) {
143		trapFocus('modal '+'.form_div');
144	});
145	
146	$('#signup-form-load #PopUpFormRequest .success_divs .btn_popup').on('keydown', function (e) {
147		trapFocus('modal '+'.success_divs');
148	});
149	
150	$('.prescribingInformation').on('keydown', function (e) {
151		trapFocus('isi-interstitial');
152	});
153	
154	/*$(".form-check-input").change(function() {
155		if(this.checked) {
156			alert("hi..");
157		}
158	});*/
159	$('.form-check-input').keypress(function(e) {
160		if((e.keyCode ? e.keyCode : e.which) == 13 && $(this).not(':checked').length >= 1){
161			$(this).prop( "checked", true );
162			if($(this).attr('id') == 'savings-Mobile1') {
163				$('.privacy-para').removeAttr('style');
164			}
165		} else if((e.keyCode ? e.keyCode : e.which) == 13 && $(this).not(':checked').length == 0){
166			$(this).prop( "checked", false );
167		}
168	});
169		
170	$(".indication-tooltip").on('keydown', function(e) { 
171		var keyCode = e.keyCode || e.which; 
172		
173		if (keyCode == 9) { 
174			$('header .tooltiptext').focus();
175			$('header .tooltiptext').css("display", "block");
176		} 
177	});
178	
179	$("header .tooltiptext").on('keydown', function(e) { 
180		var keyCode = e.keyCode || e.which;
181		
182		if (keyCode == 9) { 
183			$('header .tooltiptext').css("display", "none");
184		} 
185	});
186	/* $('.form-check-input').keypress(function(e){
187		if((e.keyCode ? e.keyCode : e.which) == 13){
188			$('.form-check-input').css("background", "url(/~/media/Themes/Common/CelebrexCom/CelebrexCom/images/checkboxChecked_bg.png) no-repeat");
189		}
190	}); */
191});
192
193$(window).on('load', function(){
194    var itemName = sessionStorage.getItem("currentSessionItem")
195	
196	if(itemName === "wob") {
197		$("body").removeClass("normal");
198		$("body").addClass("wob");
199	} else if(itemName === "normal") {
200		$("body").removeClass("wob");
201		$("body").addClass("normal");
202	}
203});

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.