Quote:
Originally Posted by Doitsu
I only have rudimentary JavaScript skills, but I believe that your code probably doesn't work because you forgot to make sure that the page was fully loaded before the script is run. Since I was too lazy to search for a pure JavaScript solution, I simply used jQuery to check the ready state:
Code:
$(document).ready(function() {
window.frames["f1"].addEventListener("resize", setup);
});
I plugged your slightly modified code into the ePub3 wrapper of the file that I attached to the second post and it appears to be working with ADE 4.5 but pretty much nothing else.
|
Thank you very much Doitsu! Not only in ADE works (that alone means a lot) but also in Calibre; it works perfectly under those GUIs. Now I have to figure out why it can't work under Readium and Azardi but it's very good to me that ADE runs the script flawlessly. In my script I had included the statement:
Code:
window.addEventListener("load", setup);
that supposedly it should run the script when the epub was loaded but it seems that is not the same that you code based on jquery (THAT IT DOES WORK!):
Code:
$(document).ready(function() {
window.frames["f1"].addEventListener("resize", setup);
});
Quote:
BTW, if you want to create a valid epub, you can't use position: absolute; in the CSS. epubcheck will also complain about the name attribute; use id instead. (The attached file will pass epubcheck 4.)
|
Yes Doitsu, you are right and I was aware about the property position in ebooks but as Sigil and ADE accepted it, I include it (do the try enabling "position: absolute" and changing "visibility: normal" in the iframe styles). Regarding the "name" attribute, I don't know what to tell you. Of course, you are right, "name" is deprecated but for <iframe> tags, it seems that "name" is still valid. You included the "id" attribute but Sigil will complain about it (in fact, it doesn't accept the iframe tag neither

). But your epub passes epubcheck 4, so what you wrote is ok!
Quote:
IMHO, you'd be better off looking for a pure CSS solution. Since you're apparently interested in fleurons, have a look at the ::after pseudo selector. Maybe you could manipulate its CSS rule to achieve the desired result.
|
Yes

Rembember this old thread?
https://www.mobileread.com/forums/sho...d.php?t=212300
But I not only interested in fleurons Doitsu; with javascript you can change the layout of any epub; things that are ok with some font-size, they can not be with a new size. I think that the script I'm looking for, it can be very useful for everyone once epub3 becomes popular.
THANK YOU VERY MUCH FOR YOUR HELP.
Rubén