scaron / prettyphoto

prettyPhoto is a jQuery based lightbox clone. Not only does it support images, it also add support for videos, flash, YouTube, iFrames. It’s a full blown media lightbox. The setup is easy and quick, plus the script is compatible in every major browser.
http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/
553 stars 281 forks source link

HTML5 Valid PrettyPhoto #68

Closed iMattPro closed 12 years ago

iMattPro commented 13 years ago

In HTML5, the rel tag is more strictly validated for its proper usage. So, basically, prettyphoto can not use the rel tag.

Perhaps it is time to switch to using the class tag instead of the rel tag.

$("a[class^='prettyPhoto']").prettyPhoto();

scaron commented 13 years ago

Hi there.

I plan on switching to the "data-" attribute instead. This way I could create a couple of proprietary attribute and this would cleanup the href a lot.

Example: Link Would become Link

scaron commented 13 years ago

Didn't mean to close it ;)

What do you think of that?

iMattPro commented 13 years ago

The only question about that, is if you switch to the data- attribute, then prettyPhoto would only validate in HTML5 documents. ie: somebody still using XHTML1 would fail validation because their doctype wouldn't support data- even though it will still work as far as the browser is concerned.

So I am not sure what the most universal solution is :S

iMattPro commented 12 years ago

Yes, nbrew has a good solution there!