You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

[HTML 4.01 Validation] rel not valid in img tag Created Nov 15, 2009

This thread is solved

Views: 3804     Replies: 6     Last reply Oct 23, 2011  
You must login first before you can use this feature

agherschon

Posts: 1

Registered:
Nov 11, 2009

[HTML 4.01 Validation] rel not valid in img tag

Posted: Nov 15, 2009

Hi,

I used the Overlay which is awesome ! Thank you very much for your good work !

I have a tiny small remark about it.

To use it, it is explained that I should add a "rel" attribute on the <img> tag, which is not valid in HTML 4.01 Strict or HTML 4.01 Transitional.

As I really wanted to validate my page, I modified the code to use the "id" tag of the <img> attribute, instead of "rel" attribute. Also, the character "#" is not a valid one in an "id" attribute. So I did this:

In the HTML page, the image :

<img src="./images/screenshots/mam-account-manager.png" style="height:200px;" id="mam" >
In the HTML page, the "overlay detail div":

    <div class="simple_overlay" id="overlay-mam">
    </div>
In the tools.overlay-1.1.2.js file, lines 82 and 83:

var jq = conf.target || trigger.attr("id");
overlay = jq ? $('#overlay-' + jq) : null || trigger;

I will be happy to read about any of your thoughts on this validation "issue" !

Thank you for your time !

sottwell

Posts: 2

Registered:
Nov 19, 2009

» [HTML 4.01 Validation] rel not valid in img tag

Posted: Nov 21, 2009

Reply to: [HTML 4.01 Validation] rel not valid in img tag, from agherschon
I also would be interested in a solution to this; in my case I'm using the jquery.tools.min.js toolkit for the video overlays, and it uses buttons, which also cannot have a "rel" attribute. Other than this, all of my pages validate cleanly.

Flowplayer is a wonderful piece of work. I'm making all my clients who want a Flash player pay for a commercial version; it's well worth the cost!

wernerglinka

Posts: 11

Registered:
Nov 22, 2009

wrap the img into an "a" tag and change the selector to a

Posted: Dec 3, 2009

Reply to: » [HTML 4.01 Validation] rel not valid in img tag, from sottwell
To get around this issue I have wrapped my images in an a tag and changed the selector to $("a[rel]").overlay();
Works well

goblazers70

Posts: 1

Registered:
Feb 4, 2010

» wrap the img into an "a" tag and change the selector to a

Posted: Mar 26, 2010

Reply to: wrap the img into an "a" tag and change the selector to a, from wernerglinka
Excellent suggestion "wernerglinka".

Worked like a charm.

Thank you!

Stormblade

Posts: 3

Registered:
Aug 20, 2011

» » wrap the img into an

Posted: Aug 20, 2011

Reply to: » wrap the img into an "a" tag and change the selector to a, from goblazers70
Which DOCTYPE are you guys validating on. Using the anchor tag instead of the img is fine but # is not a valid value for the rel value

"character "#" is not allowed in the value of attribute "rel""

This was XHTML strict. If it can match up without that # it'd be perfect.

Edit:http://flowplayer.org/tools/forum/40/36626

anton_m

Posts: 2

Registered:
Oct 23, 2011

add the rel attribute after the page is loaded with js.

Posted: Oct 23, 2011

Reply to: [HTML 4.01 Validation] rel not valid in img tag, from agherschon
In order to validate you should add the "#" symbol after the page is fully loaded using the js code. In my example i add the full rel value, but if it's allready set you can append only the "#" at the begining of the string, by using some some basic js string processing rules.


<script type="text/javascript">   
 // perform JavaScript after the document is scriptable.
 $(function() {
   $('.get-it').attr('rel', '#prompt');
 });
</script> 
.get-it is the trigger element

I tried it and it works!