Foros del Web » Creando para Internet » HTML »

Validar W3C "there is no attribute"

Estas en el tema de Validar W3C "there is no attribute" en el foro de HTML en Foros del Web. Hola foro: A ver si alguno me puede echar una mano para validar la siguiente linea en W3C XHTML 1.0 Strict <a href="#" data-reveal-id="myModal" ><img ...
  #1 (permalink)  
Antiguo 06/05/2012, 14:49
Avatar de rodrigus71  
Fecha de Ingreso: mayo-2012
Ubicación: Alicante
Mensajes: 73
Antigüedad: 12 años
Puntos: 3
Validar W3C "there is no attribute"

Hola foro:

A ver si alguno me puede echar una mano para validar la siguiente linea en W3C XHTML 1.0 Strict

<a href="#" data-reveal-id="myModal" ><img src="img/ban_letter.jpg" alt="catalogos" width="150" height="115" class="margen_top" style="margin-left:5px" /></a>

Se trata de una ventana modal que he añadido en js

El error que me dá es el siguiente: there is no attribute "data-reveal-id"

Gracias de antemano
  #2 (permalink)  
Antiguo 06/05/2012, 15:10
txemaarbulo
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Validar W3C "there is no attribute"

Suelen ocurrir estas cosas. Y más si se trata de XHTML 1.0 Strict
Tal vez te sirva esto:

// @CHANGED - Hecho de modo que acepta el atributo rel en lugar de data-reveal-id
$('a[rel]').live('click', function(e) {
e.preventDefault();
var modalLocation = $(this).attr('rel');
$('#'+modalLocation).reveal($(this).data());
});
  #3 (permalink)  
Antiguo 06/05/2012, 15:23
Avatar de rodrigus71  
Fecha de Ingreso: mayo-2012
Ubicación: Alicante
Mensajes: 73
Antigüedad: 12 años
Puntos: 3
Respuesta: Validar W3C "there is no attribute"

Hola txemaarbulo, no entiendo bien tu respuesta.
Donde debo poner el código que me has facilitado?
Debo modificarlo en algo?
Debo modificar también la linea que he citado arriba?
  #4 (permalink)  
Antiguo 06/05/2012, 15:45
txemaarbulo
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Validar W3C "there is no attribute"

Cambiamos a rel en mis <a href llamadas y modificamos el archivo jquery.reveal.js
(Ventanas modales con jQuery)

Textual del ingles:
/*---------------------------
Listener for data-reveal-id attributes
----------------------------*/
// @CHANGED - Made it so that it accepted the rel attribute instead of the data-reveal-id
$('a[rel]').live('click', function(e) {
e.preventDefault();
var modalLocation = $(this).attr('rel');
$('#'+modalLocation).reveal($(this).data());
});

Puedes leer la cuestión en[URL="https://github.com/zurb/reveal/issues/11"] https://github.com/zurb/reveal/issues/11[/URL]
  #5 (permalink)  
Antiguo 07/05/2012, 00:02
Avatar de zerokilled
Javascripter
 
Fecha de Ingreso: abril-2009
Ubicación: Isla del Encanto, La Borinqueña [+>==]
Mensajes: 8.050
Antigüedad: 15 años
Puntos: 1485
Respuesta: Validar W3C "there is no attribute"

buenas.

Cita:
Suelen ocurrir estas cosas. Y más si se trata de XHTML 1.0 Strict
independientemente si se trata de un documento con modalidad estrícta o de tipo xhtml, el error no tiene que ver nada con dichas definiciones. si lo intentas en html4.01 ‒ en cualquiera de sus modaliddes (strict, transitional) ‒ o en un documento xhtml transitional, el error de validación persitirá. la razón es muy simple, se está usando un atributo que el tipo de documento no define. el propio mensaje de error es claro; there is no attribute "data-reveal-id" que significa no hay ningún atriuto "data-reveal-id" ‒ haciendo referencia al DTD aplicado.
__________________
la maldad es una virtud humana,
y la espiritualidad es la lucha del hombre contra su maldad.
  #6 (permalink)  
Antiguo 07/05/2012, 11:13
Avatar de rodrigus71  
Fecha de Ingreso: mayo-2012
Ubicación: Alicante
Mensajes: 73
Antigüedad: 12 años
Puntos: 3
Respuesta: Validar W3C "there is no attribute"

Cita:
Iniciado por txemaarbulo Ver Mensaje
Cambiamos a rel en mis <a href llamadas y modificamos el archivo jquery.reveal.js
(Ventanas modales con jQuery)

Textual del ingles:
/*---------------------------
Listener for data-reveal-id attributes
----------------------------*/
// @CHANGED - Made it so that it accepted the rel attribute instead of the data-reveal-id
$('a[rel]').live('click', function(e) {
e.preventDefault();
var modalLocation = $(this).attr('rel');
$('#'+modalLocation).reveal($(this).data());
});

Puedes leer la cuestión en[URL="https://github.com/zurb/reveal/issues/11"] https://github.com/zurb/reveal/issues/11[/URL]

Gracias txemaarbulo diste en el clavo, he conseguido validar sin problemas

Etiquetas: w3c
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:07.