PageSourceSearch

https://bookofmormoncentral.org/sites/all/themes/bmc/js/custom.js?ssrm01

js bookofmormoncentral.org collected 2026-10-01 11:44:17 UTC 2,260 bytes, 78 lines download raw bytes

1(function ($) {
2
3	$(document).ready(function(){
4
5	//Header shrinking function
6	/*
7	$(document).on("scroll", function(){
8		if
9      	($(document).scrollTop() > 100){
10		  $("header#navbar").addClass("shrink");
11		}
12		else
13		{
14			$("header#navbar").removeClass("shrink");
15		}
16	});
17	*/
18	//Adjust Page Title Style on Hero Landing Pages that are Views
19		if ($('.view').hasClass('view-mode-hero-landing')) {
20			$('#page-title').addClass("hero-title");
21			$('#page-title').addClass("view-title");
22		}
23
24		//accordion for toggling large content
25		var coll = document.getElementsByClassName("accordion");
26		var i;
27
28		for (i = 0; i < coll.length; i++) {
29		  coll[i].addEventListener("click", function() {
30		    this.classList.toggle("accordion-active");
31		    var content = this.nextElementSibling;
32		    if (content.style.maxHeight){
33		      content.style.maxHeight = null;
34		    } else {
35		      content.style.maxHeight = content.scrollHeight + "px";
36		    } 
37		  });
38		}
39		//end accordion
40
41		/*
42		*
43		* Donation Thermometer */
44		    // Get total and percent
45		    var total = $(".views-field-value:last").text().trim();
46		    var percent = $(".views-field-expression-1:last").text().trim();
47		    total = "$" + total.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,");
48
49		    // Update total and percent
50		    $(".donation-current p").text(total);
51		    $(".view-donation-results .view-header p").last().text("We have completed " + percent + " of our goal to enable us to flood the earth with the Book of Mormon through 2021.")
52		 
53		    // Update progress bar
54		    $(".pgbar-complete").animate({width: percent}, 1000)
55		    //end Donation Thermometer
56		    var thermometer_width = $('.pgbar').width();
57		    var year_position = thermometer_width/5/2+5;
58		    console.log(year_position);
59		    $(".pgbar-year").css("right", year_position);
60
61
62		//Masonry js
63			var $grid = $('.grid').masonry({
64			  // options
65			  itemSelector: '.grid-item',
66			  columnWidth: '.grid-sizer',
67			  gutter: 20,
68			  percentPosition: true
69			});
70			// layout Masonry after each image loads
71			//$grid.imagesLoaded().progress( function() {
72			  //$grid.masonry('layout');
73			//});
74		//end Masonry js
75
76
77	})
78})(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.