PageSourceSearch

https://creditflux.com/js/site_functions.js

js creditflux.com collected 2026-10-02 07:53:07 UTC 5,676 bytes, 188 lines download raw bytes

1
2 	$(document).ready(function() {
3
4		//display cookie alert
5		// use a conditional or cookie to determine whether the user has already clicked close.
6		$('#cookies').slideDown('slow');
7
8		//close cookie alert
9		$('#cookies a#close').click(function(){
10			$('#cookies').slideUp('slow');
11		});
12		
13		
14		//display alert message
15		// use a conditional or alert to determine whether the user has already clicked close.
16		$('#alert_message').slideDown('slow');
17
18		//close alert message
19		$('#alert_message a#close').click(function(){
20			$('#alert_message').slideUp('slow');
21		});
22		
23
24	   //set all the columns on the homepage > 3_cols container to the same height
25	  	var highestCol = Math.max($('.col.one').height(), $('.col.two').height(), $('.col.three').height());
26	  	$('.col').height(highestCol);
27
28	  	//tag cloud box expand
29	  	$('#expand a').click(function(){
30		  	var txt = $("#collapsed_content").is(':visible') ? 'show more' : 'show less';
31		  	$("#expand a").text(txt);
32		  	$("#expand a").toggleClass('close');
33		  	$("#collapsed_content").slideToggle();
34		});
35
36/*		// Load login modal on click
37		$('.basic').click(function (e) {
38		$('.login').modal({opacity:70});
39
40		return false;
41		});
42
43		// Loads subscribe modal on click
44		$('.locked_article').click(function (e) {
45		$('.subscribe').modal({opacity:70});
46		$('.login').$.modal.close();
47		return false;
48		});
49
50		// Loads register modal on click
51		$('.register_article').click(function (e) {
52		$('.register').modal({opacity:70});
53
54		return false;
55		});
56
57		// Loads logout modal on click
58		$('.log_out_modal').click(function (e) {
59		$('.logout').modal({opacity:70});
60
61		return false;
62		});
63
64		// Loads DOB modal on click
65		$('.logindate').click(function (e) {
66		$('.birthday').modal({opacity:70});
67
68		return false;
69		});
70*/
71		setTimeout(function(){ $(".timeout").fadeOut(); }, 2000);
72
73		// close alert boxes on click
74		$('a.close_box').click(function(){
75	 		$(this).parent('.box').fadeOut('slow');
76 		});
77
78		//new ticker
79		$('ul#news').innerfade({
80						speed: 1000,
81						timeout: 5000,
82						type: 'sequence',
83						containerheight: '80px'
84		});
85
86
87		$('#news_letter_ticker').vTicker({
88			speed: 500,
89			pause: 5000,
90			animation: 'fade',
91			mousePause: false,
92			showItems: 7
93		});
94
95		//make a comment
96		$('a.comment_btn').click(function(){
97			$('#make_a_comment').slideToggle('slow');
98
99			$(this).html($(this).text() == 'Hide comment' ? 'Make a comment' : 'Hide comment');
100		});
101
102
103 	$("#show").click(function(){
104        $('#visible').slideToggle();
105        $('#show').html($('#show').text() == 'Hide me' ? 'Show Me' : 'Hide me');
106    });
107
108
109		//events menu
110	var config = {
111		over: function() {
112			$(this).children('ul li ul').fadeIn();
113			$(this).children('ul li a').addClass('hovered_menu');
114		},
115		timeout: 300,
116		out: function() {
117			$(this).children('ul li ul').fadeOut();
118			$(this).children('ul li a').removeClass('hovered_menu');
119		}
120	};
121	$("ul#navigation li").hoverIntent(config);
122
123	//content slider
124	 $('#vertical-news').bxSlider({
125				  mode: 'vertical',
126				  controls: false,
127				  pager:false,
128				  autoStart: true,
129				  auto:true,
130				  speed: 2000,
131				  pause: 5000
132			  });
133
134	 //mobileNav actions
135	 $('#mobileMenu').click(function(){
136	 	$('ul#navigation ').slideToggle();
137	 });
138
139	var mobileSearchButtonSelector = '.dw-header .responsive-navigation-wrapper .mobile-search-from__form .navigation-button--search';
140	var mobileSearchInputSelector = '.dw-header .responsive-navigation-wrapper .mobile-search-from__form .mobile-search-form-input';
141	var mobileNavPrimaryButtonSelector = '.dw-header .responsive-navigation-wrapper .header-nav__button--primary';
142	var mobileNavSecondaryButtonSelector = '.dw-header .responsive-navigation-wrapper .header-nav__button--secondary';
143	var userMenuButtonSelector = '.dw-header .header-actions-list .user--menu--button';
144	var headerUserModelSelector = '.dw-header .header-actions-list .user-model';
145	var responsiveNavWrapperSelector = '.dw-header .responsive-navigation-wrapper';
146	var navWrapperSelector = '.dw-header .navigation-wrapper';
147	
148	$(mobileSearchInputSelector).val('');
149	
150	$(document.body).on('click', mobileNavPrimaryButtonSelector, function () {
151		$(this).toggleClass('header-nav__button--close');
152		$(responsiveNavWrapperSelector).toggleClass('navigation-menu--open');
153		$(navWrapperSelector).toggleClass('navigation-menu--open');
154	});
155
156	$(document.body).on('click', mobileNavSecondaryButtonSelector, function () {
157		$(this).parent().toggleClass('nav-list__item--expanded');
158	});
159
160	$(document.body).off('change', mobileSearchInputSelector);
161	
162	$(document.body).on('change keyup', mobileSearchInputSelector, function (event) {
163		var inputValue = $(this).val().trim();
164		if (inputValue.length > 0) {
165			$(mobileSearchButtonSelector).prop('disabled', false);
166		} else {
167			$(mobileSearchButtonSelector).prop('disabled', true);
168		}
169	});
170	
171	$(document.body).on('click', mobileSearchButtonSelector, function(event) {
172		var input = $(this).siblings('.mobile-search-form-input');
173		
174		if (input) {
175			$(this).parent().submit();
176		}
177	});
178		
179	 $(document.body).on('click', userMenuButtonSelector, function () {
180		$(headerUserModelSelector).toggleClass('overlay--open');
181		$(userMenuButtonSelector).toggleClass('button--header--fill');
182	});
183
184	$(document.body).on('click', '.dw-header .header-actions-list .overlay__icon--close', function () {
185		$(headerUserModelSelector).removeClass('overlay--open');
186		$(userMenuButtonSelector).removeClass('button--header--fill');
187	});
188});

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.