PageSourceSearch

https://www.newbrunswick.com/shared/assets/jscript/jquery_shading.js

js newbrunswick.com collected 2026-10-02 08:18:57 UTC 2,134 bytes, 54 lines download raw bytes

1var $init_open_close_exception_filter_each = function ($pi_index, $po_element) {
2	
3	$ ($po_element).slideToggle ('slow');
4}
5
6var $init_open_close_exception_handler = function ($po_event) {
7	
8	$po_event.preventDefault ();
9	
10	var $class_name = $ (this).data ('relation');
11	$ ('.glyphicon', this).toggleClass ('glyphicon-chevron-down').toggleClass ('glyphicon-chevron-up');
12	$ ('.glyphicon-label', this).html ($ ('.glyphicon-label', this).html () == 'open' ? 'close' : 'open');
13	$ ('.transformicon', this).toggleClass ('open');
14	$ ('.init_close_exception').filter ('.' + $class_name).each ($init_open_close_exception_filter_each);
15}
16
17var $init_window_shade = function () {
18	
19	$ ('.init_close_exception').not ('[data-open="true"]').hide ();
20	
21	if (($ ('.init_open_exception').length == 0)) {
22		
23		$ ('.init_open_exception_inner').wrap (function () {
24			return '<span class="init_open_exception" data-relation="' + $ (this).data ('relation') + '" data-open="' + $ (this).data ('open') + '"></span>';
25		});
26		$ ('.init_open_exception').on ('click', $init_open_close_exception_handler);
27	}
28	if (($ ('.init_open_close_handle').length == 0)) {
29		$ ('.init_open_exception[data-open="false"]').append ('<span class="init_open_close_handle no-break"> <span class="glyphicon-label button-link text-uppercase">open</span><i class="transformicon cross-toggle"><span class="display_down bg-color1"></span></i></span>');
30		$ ('.init_open_exception[data-open="true"]').append ('<span class="init_open_close_handle no-break"> <span class="glyphicon-label button-link text-uppercase">close</span><i class="transformicon cross-toggle open"><span class="display_down bg-color1"></span></i></span>');
31	}
32}
33
34var $destroy_window_shade = function ($po_event) {
35	
36	$ ('.init_open_close_handle').remove ();
37	$ ('.init_close_exception').show ();
38}
39
40var $init_or_destroy_window_shade = function () {
41	
42	if (($ (window).width () >= 768)) $destroy_window_shade ();
43	else $init_window_shade ();
44}
45
46jQuery (document).ready (function ($) {
47	
48	$init_or_destroy_window_shade ();
49});
50
51$ (window).on ('resize', function ($po_event) {
52	
53	$init_or_destroy_window_shade ();
54})

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.