View Single Post
Old 11-22-2010, 07:57 PM   #7
whbenson
Enthusiast
whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.whbenson ought to be getting tired of karma fortunes by now.
 
Posts: 37
Karma: 493532
Join Date: May 2010
Device: ipad
FWIW, the following sample code works in both Sigil and iBooks.

Code:
 <?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
  <script type="text/javascript">
  //<![CDATA[
  alert("screen width=" + screen.width);
  //]]>
  </script>
</head>

<body>
</body>
</html>
Also, a workaround to editing javascript files in Sigil is to give the file a .css extension and put it in the Styles folder. Both iBooks and Sigil are happy with this.
-Bill
whbenson is offline   Reply With Quote