PageSourceSearch

https://online.televia.com.mx/_ui/responsive/common/js/acc.tabs.js

js televia.com.mx collected 2026-09-24 12:17:02 UTC 2,700 bytes, 112 lines download raw bytes

1ACC.tabs = {
2
3	_autoload: [
4		["bindTabs", $(".js-tabs").length > 0],
5		"hideReviewBtn",
6		"determineToDisplayReviews"
7	],
8
9	bindTabs: function(){
10
11		$e = $(".js-tabs");
12		 var tabs = $e.accessibleTabs({
13			tabhead:'.tabhead',
14			tabbody: '.tabbody', 
15			fx:'show', 
16			fxspeed: 0,
17			currentClass: 'active', 
18			autoAnchor:true
19		});
20
21		$e.on("click",".tabhead",function(e){
22			e.preventDefault();
23
24			if($(this).hasClass("active")){
25				$(this).removeClass("active");
26			}else{
27				$(this).parents(".js-tabs").children(".tabs-list").find("a[href='"+"#"+$(this).attr("id")+"']").click();
28
29				var offset = $(this).offset().top;
30				$("body,html").scrollTop(offset);
31			}
32			
33		});
34		
35		$e.on("click","#tabreview",function(e){
36			e.preventDefault();
37            ACC.track.trackShowReviewClick();
38			ACC.tabs.showReviewsAction("reviews");
39		});
40		
41		$e.on("click",".all-reviews-btn",function(e){
42			e.preventDefault();
43			ACC.tabs.showReviewsAction("allreviews");
44			ACC.tabs.hideReviewBtn(".all-reviews-btn");
45			ACC.tabs.showReviewBtn(".less-reviews-btn");
46		});
47		
48		$e.on("click",".less-reviews-btn",function(e){
49			e.preventDefault();
50			ACC.tabs.showReviewsAction("reviews");
51			ACC.tabs.hideReviewBtn(".less-reviews-btn");
52			ACC.tabs.showReviewBtn(".all-reviews-btn");
53		});
54		
55		$(document).on("click", '.js-writeReviewTab', function(e){
56			e.preventDefault();
57			tabs.showAccessibleTabSelector($(this).attr("href"));
58			$(".js-review-write").show();
59			$('#reviewForm input[name=headline]').focus();
60		});
61		
62		$(document).on("click",".js-review-write-toggle",function(e){
63			e.preventDefault();
64			if($(".js-review-write:visible").length<1){
65				$(".js-review-write").show();
66
67			}else{
68				$(".js-review-write").hide();
69			}		
70		});
71
72		$(document).on("click",".js-openTab",function() {
73            tabs.showAccessibleTabSelector($(this).attr("href")); 
74		});
75	},
76	
77	showReviewsAction: function (s)
78	{
79		$.get($("#reviews").data(s), undefined, function (result){
80			$('#reviews').html(ACC.sanitizer.sanitize(result));
81			if($(".js-ratingCalc").length > 0){
82				ACC.ratingstars.bindRatingStars();
83				ACC.tabs.showingAllReviews();
84			}
85		}, 'html');
86	},
87	
88	hideReviewBtn: function (btnClass) {
89
90		btnClass = (btnClass === undefined) ? ".less-reviews-btn" : btnClass;
91		$(btnClass).hide();
92	},
93	
94	showReviewBtn: function (btnClass) {
95		$(btnClass).show();
96	},
97	
98	showingAllReviews: function()
99	{
100		var isShowingAllReviews = $("#showingAllReviews").data("showingallreviews");
101		if(isShowingAllReviews){
102			ACC.tabs.hideReviewBtn(".all-reviews-btn");
103		}
104	},
105	
106	determineToDisplayReviews: function ()
107	{
108		if(location.hash === "#tabreview"){
109			ACC.tabs.showReviewsAction('reviews');
110		}
111	}
112};

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.