View Single Post
Old 06-05-2015, 05:09 PM   #1
MikeT!
Junior Member
MikeT! began at the beginning.
 
Posts: 9
Karma: 10
Join Date: May 2015
Device: Kobo
Question Epub3 - Spoiler in a list

Hello everybody!

I'm doing an interactive Index, and i will insert a spoiler for chapters..i thought that is all ok, but epub-checker (like always) doesn't like it

The code is
Code:
<body>
<h2>Index</h2>
<ul id="miniflex">
  <li><a href="../Text/colophon.xhtml" title="">Colophon</a></li>
 <li><a href="../Text/colophon.xhtml" onclick="if(document.getElementById('spoiler') .style.display=='none') {document.getElementById('spoiler') .style.display=''}else{document.getElementById('spoiler') .style.display='none'}" title="spoiler">Capitoli</a></li>
  <div id="spoiler" style="display:none"> 
  <li><a href="../Text/Capitolo1.xhtml" title="">Capitolo 1</a></li>
  <li><a href="../Text/Capitolo2.xhtml" title="">Capitolo 2</a></li>
  <li><a href="../Text/Capitolo3.xhtml" title="">Capitolo 3</a></li>
  <li><a href="../Text/Capitolo4.xhtml" title="">Capitolo 4</a></li>
  <li><a href="../Text/Capitolo5.xhtml" title="">Capitolo 5</a></li>
   ...
   ...
   ...
  </div>
  <li><a href="../Text/playlist.xhtml" title="">Archivio Audio</a></li>
</ul>


</body>
</html>
The problem is simple, XHTML doesn't accept <div> in a list.
( element "div" not allowed here; expected the element end-tag or element "li")
But here is the problem..how i can fix it?
There is another method to insert spoiler in a list?
Thank's for any helpful!
MikeT! is offline   Reply With Quote