PDA

View Full Version : Animated Collapsible DIV v2.4 / rel="toggle[...]" / not valid



Toefoe
02-05-2016, 05:10 PM
1) Script Title: Animated Collapsible DIV v2.4

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3) Describe problem:

In HTML5 this link type is not valid. See also: http://www.w3.org/TR/html5/links.html#linkTypes

I.e. for the demo-code in the "pet-area": Bad value "toggle[cat]" for attribute "rel" on element "a": The string "toggle[cat]" is not a registered keyword.

jscheuer1
02-05-2016, 11:52 PM
That's right! This script was written before or shortly after that standard evolved. You can either use a different, probably earlier standard like XHTML 1 (I no longer keep up with everything new in standards), though there might yet be a newer one that's applicable. Bottom line, doesn't break the code in any modern browser. HTML 5 wants all rel attributes to adhere to strict guidelines. This script takes liberties with that, as all previous standards allowed. Oh, and you could use an HTML 5 compliant attribute like one of any of the allowed made up data hyphen (data-whatever) ones to substitute for rel and thereby make the page HTML 5 strict. However, the script would have to be edited, perhaps extensively, to accommodate that. Does it still work as is? I bet it does.

mlegg
02-06-2016, 01:13 AM
try this http://jsfiddle.net/44v8yggp/

Beverleyh
02-06-2016, 07:37 AM
Maybe this can be of use? http://fofwebdesign.co.uk/template/_testing/jquery-faqs.htm

Ripsaw
02-06-2016, 01:08 PM
Oooh, nice work Beverleyh!

Yes the Dynamic Drive script continues to work with the HTML 5 web pages Toefoe so it's your call as to whether you use it. Does it matter if it validates? Who will know but you? Will anyone else go out of their way to check?

You can prolly keep right on using it and no one will be any wiser :)

Toefoe
02-08-2016, 02:15 PM
Thank you very much! I will go on with your suggestions...