PageSourceSearch

https://s3.elespanol.com/vendor_js/opta/opta-widgets-races-menu.js

js elespanol.com collected 2026-09-24 09:08:22 UTC 2,397 bytes, 92 lines download raw bytes

1function sacar_widget_completo (paramDIV, paramDIV_MEN)
2{
3	$jOPTA(paramDIV_MEN).empty();
4	
5	click_en_menu(paramDIV, paramDIV_MEN, iOpcionMenu);
6	
7	preparar_menu_carpetas(paramDIV, paramDIV_MEN);
8};
9
10function preparar_menu_carpetas (paramDIV, paramDIV_MEN)
11{
12	var c = '';
13	var lista_menu = paramMENU.split(",");
14	
15	iW = iW = $jOPTA("#opta-widgets-races-detalle").width();
16	//iWE = ( (iW - 52) / lista_menu.length);
17	iWE = ( (iW - 15) / lista_menu.length);
18	porcen = ( (iWE * 100 ) / iW);
19	
20	//preparar_opcion_menu ();
21	
22	c += '<ul id="opta-linea-menu" class="opta-linea-menu">';
23	for (var i=0; i<lista_menu.length; i++) 
24	{
25			c += '<li id="opta-menu-opcion-' + lista_menu[i] + '" class="opta-opcion' ;
26			if ( lista_menu[i] == iOpcionMenu ) { c += ' activa' };
27			c += '"';
28			c += ' style="width:' + porcen + '%;' + cursorpointer + '"';
29			c += ' onclick="click_en_menu(\'' + paramDIV + '\'' + ',\'' + paramDIV_MEN + '\'' + ',\'' + lista_menu[i] + '\')" ';
30			c += '>';
31			c += array_idiomas_MENU[lista_menu[i]];
32			c += '</li>';
33	};
34
35	c += '</ul>';
36	
37	c += '<div></div>';
38	
39	c += '	<div class="floatstop"></div>';
40	
41	$jOPTA(paramDIV_MEN).append(c);
42
43	preparar_opcion_menu ();
44	
45	click_en_menu(paramDIV, paramDIV_MEN, iOpcionMenu);
46
47};
48function preparar_opcion_menu ()
49{
50	if (iOpcionMenu == 0) 
51	{
52		iOpcionMenu = opcion_menu_clf;
53		
54		if (array_clasificaciones.length < 1) {
55			iOpcionMenu = opcion_menu_cal;
56		};
57		
58		if (array_clasificaciones.length > 0) {
59			iOpcionMenu = opcion_menu_res;
60		};
61		
62		if (pruebacarrera > 0) {
63			iOpcionMenu = opcion_menu_dto;
64			//if (xml_directo_clf_fin[pruebacarrera] == true) {
65				if (array_pruebas[pruebacarrera].length > 0) {
66					iOpcionMenu = opcion_menu_res;
67				};
68			//};
69		};
70	};
71};
72
73
74
75function click_en_menu(paramDIV, paramDIV_MEN, opcion)
76{
77	$jOPTA(paramDIV_MEN + " #opta-linea-menu").find('li').each(function () {
78		if ($jOPTA(this).attr('id') == "opta-menu-opcion-" + iOpcionMenu) {
79			$jOPTA(this).removeClass("activa");
80		};
81		if ($jOPTA(this).attr('id') == "opta-menu-opcion-" + opcion) {
82			$jOPTA(this).addClass("activa");
83		}
84	});
85	
86	$jOPTA(paramDIV + " #opta-menu" + iOpcionMenu).css("display", "none");
87	iOpcionMenu = opcion;
88	$jOPTA(paramDIV + " #opta-menu" + iOpcionMenu).fadeToggle("slow");
89	
90	google_opcion = array_idiomas_MENU[opcion];
91
92};

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.