Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Animated Collapsible DIV v2.4 -- 'data-openimage' does not validate

  1. #11
    Join Date
    Mar 2010
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    Hmm the other approach is to change the two attributes used, "data-openimage" and "data-closedimage", to something that will validate in your current doctype. The problem is there aren't that many HTML attributes at your disposal, considering "rel" is also taken by the script as well. But just as an example, lets say you decide to use "title" and "rev" respectively instead:

    Code:
    <a href="#" rel="toggle[jason]" title="expand.jpg" rev="collapse.jpg"><img src="collapse.jpg" style="border-width:0" /></a>
    To enable the above, inside the .js file, do a search and replace, replacing all "data-openimage" with "title", and all "data-closedimage" with "rev". That should do it.
    Hi DDAdmin,

    Replacing all "data-openimage" with "title", and all "data-closedimage" with "rev" works great, but I use title as my image alt for FireFox
    Code:
    title="images/minus_icon.png" rev="images/plus_icon.png" title"myimagetitle".
    and its not validating as a xhtml because it has two title's. Is there something else to replace "data-openimage" with "title", but not title???

    Many thanks for your time

  2. #12
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm you're really running out of attributes to use then. Instead of "title", you may want to try "class" or "dir".

    It should be noted again that "data-*" attributes are valid attributes in HTML 5. Simply by adding a HTML5 doctype to the top of your page will cause your page to validate properly:

    Code:
    <!DOCTYPE HTML>
    DD Admin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •