Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/01/2018, 07:29
quico5
 
Fecha de Ingreso: enero-2008
Mensajes: 580
Antigüedad: 16 años, 3 meses
Puntos: 9
<menuitem> aplicar estilos de prueba en <body> o en la etiqueta correspondiente

Estoy dandole vueltas en Firefox... pero apenas me salen unos simples alertas

Código HTML:
 <link href="https://fonts.googleapis.com/css?family=Abel|Glegoo|
Jongle|Poiret+One|Quicksand" rel="stylesheet">

	<script src="jquery-3.2.1.min.js"></script>
	<script>
		function gFonts(){
			$("#gFonts").on("click", "menuitem", function (event) {
				console.log($(this).attr('value'));
			});
		}
	</script> 
Código HTML:
<menu type="context" id="gFonts">
	<menu label="Google Fonts">
		<menuitem label="(Viajes) Abel" value="'Abel', sans-serif" icon="" onclick="gFonts()"></menuitem>
		<menuitem label="(Gourmet) Glegoo" value="'Glegoo', serif" icon="" onclick="gFonts()"></menuitem>
		<menuitem label="(Gimnasio) Junge" value="'Junge', serif" icon="" onclick="gFonts()"></menuitem>
		<menuitem label="(Música) Poiret One" value="'PoiretOne', Cursive" icon="" onclick="gFonts()"></menuitem>
		<menuitem label="(Negocios) Quicksand" value="'Quicksand', sans-serif" icon="" onclick="gFonts()"></menuitem>
	</menu>
</menu> 
CONSOLA Ó ALERTAS DE FIREFOX, el primer alert sale una vez, el segundo 2 veces, el tercero 3... ¿Porque hace eso?
Cita:
Sans Serif
tabs.html:84:5
Abel
tabs.html:85:5
Sans Serif
tabs.html:84:5
Glegoo
tabs.html:85:5
Sans Serif
tabs.html:84:5
Glegoo
tabs.html:85:5
Sans Serif
tabs.html:84:5
Jongle
tabs.html:85:5
Sans Serif
tabs.html:84:5
Jongle
tabs.html:85:5
Sans Serif
tabs.html:84:5
Jongle
tabs.html:85:5
Código HTML:
<body  contextmenu="gFonts"></body> 

Última edición por quico5; 15/01/2018 a las 08:20