Open jadamson opened 13 years ago
Mmm... I know this is not the best way: deceive the validator; but i'm using long ago a bypass: your elements in no processed code don't need the rel element: you can write a bypass for this. Example:
var elements = $$('.popup'); // Example for popups in|outline content:
elements.each( function(item) {
if ( item.hasClass('inline') )
item.set('rel', 'mediabox[inline 450 300]').mediabox();
else
item.set('rel', 'mediabox[720 450]').mediabox();
});
Note: I'm using old version of Mediabox. Not checked, I don't know if the DocType affects to result, ...but I guess you can use your own attributes as HTML5 data-attributes and firing constructor method (in my case: mediabox()).
Good luck! ;)
The list is not fixed, you can register more rel types: http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#concept-rel-extensions You might consider proposing a generic type (like 'media', 'popover', … dunno) rather than a proprietary 'mediabox' (though it sounds pretty generic) so all the other mediabox alternatives can use that one, too (probably increases the odds for making this an accepted standard): http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions
Edit: … or you can use the more appropriate HTML5 data-* attribute: http://html5doctor.com/html5-custom-data-attributes/
Using rel="lightbox" is no longer valid in HTML 5. Here is a list of valid types http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#linkTypes