PageSourceSearch

https://www.jbl.com.ph/on/demandware.static/Sites-JB-APAC-NCOM-Sit…/en_PH/v1790366488352/js/app/007_compare.js

js jbl.com.ph collected 2026-09-25 22:49:19 UTC 1,523 bytes, 71 lines download raw bytes

1/**
2 * @class app.compare
3 */
4(function (app, $) {
5	var $cache = {};
6	/**
7	 * @private
8	 * @function
9	 * @description Initializes the cache on the compare table
10	 */
11	function initializeCache() {
12		$cache = {
13			compareTable : $("#compare-table"),
14			categoryList : $("#compare-category-list")
15		};
16	}
17	/**
18	 * @private
19	 * @function
20	 * @description Initializes the DOM on the product tile
21	 */
22	function initializeDom() {
23		// Moved to ready.js 'activate-product-tiles'
24		// app.product.tile.init();
25	}
26	/**
27	 * @private
28	 * @function
29	 * @description Binds the click events to the remove-link and quick-view button
30	 */
31	function initializeEvents() {
32		$cache.compareTable.on("click", ".remove-link", function (e) {
33			e.preventDefault();
34			app.ajax.getJson({
35				url : this.href,
36				callback : function (response) {
37					app.page.refresh();
38				}
39			});
40		})
41		.on("click", ".open-quick-view", function (e) {
42			e.preventDefault();
43			var form = $(this).closest("form");
44			app.quickView.show({
45				url:form.attr("action"),
46				source:"quickview",
47				data:form.serialize()
48			});
49		});
50
51		$cache.categoryList.on("change", function () {
52			$(this).closest("form").submit();
53		});
54	}
55
56	/*************** app.compare public object ***************/
57	app.compare = {
58		/**
59		 * @function
60		 * @description Initializing of Cache, DOM and events
61		 */
62		init : function () {
63			initializeCache();
64			initializeDom();
65			initializeEvents();
66			app.product.initAddToCart();
67		}
68	};
69
70
71}(window.app = window.app || {}, 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.