08-07-2014, 04:51 AM | #1 |
Addict
Posts: 261
Karma: 110864
Join Date: Mar 2013
Location: Bordeaux, France
Device: Kobo Glo, Aura HD, kindle paperwhite
|
Hints for javascript in epub ?
Hi all,
Just checking to see if one of the developers here had any visions of a foreseeable future way to do javascript in epubs on kobo? What I am looking for: - tap text or button to change display properties of paragraphs (eg:hiding or displaying translations / versions of text) Regards François |
08-07-2014, 06:07 AM | #2 |
Grand Sorcerer
Posts: 24,906
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Javascript is not supported in ePub 2. There is some support in epub 3. The ACCESS renderer used for kepubs is also used for epub 3. You can have a look at http://epubtest.org/rs/86/ to see how much of the epub 3 function it supports.
|
Advert | |
|
08-07-2014, 01:45 PM | #3 |
Addict
Posts: 261
Karma: 110864
Join Date: Mar 2013
Location: Bordeaux, France
Device: Kobo Glo, Aura HD, kindle paperwhite
|
Hi DavidFor (and others)
As usual, thank you for the link. Actually, the "form" paragraph gave me some new ideas to try. To complete the references for people interested in that thread, I have used:
So far my tests for triggering a click event (on span, div, p, and on link) has had no success. The only way I could mimic a message box was using the old footnote way Hope it helps, and expecting more options for... 2015 Regards François (The only differences in the hereattached file are the extension and the metadata title, stating the format) |
08-08-2014, 06:06 AM | #4 |
Pain in the arse
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
You can do it with CSS only:
http://cssdeck.com/labs/vaztkz8p Javascript is much useful for web contents, but it is also a wonderful language if you want to get hacked. This is especially true for our rooted devices. |
08-09-2014, 09:49 AM | #5 |
Addict
Posts: 261
Karma: 110864
Join Date: Mar 2013
Location: Bordeaux, France
Device: Kobo Glo, Aura HD, kindle paperwhite
|
Hi Lucas,
Thank you for your reply and for the nice link. Unfortunately, the problem is to trigger the clic or tap on the kobo (glo or aura hd). Maybe I did something wrong (see here attached files), but I couldn't make the example work on my device. Regards François PS: you are absolutely right, I definitely need to update my advanced css tricks |
Advert | |
|
08-09-2014, 11:49 AM | #6 |
Pain in the arse
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
|
Yep, it seems that input is not supported by epub 2. You could try creating an epub 3. Anyway I tried with this other trick, but it doesn't work.
There's a workaround: for what I remember, footnotes on kepubs are opened in a popup box. I don't know how to generate footnotes for Publus. I suggest you to search between free Kobo books. |
08-09-2014, 01:18 PM | #7 |
Addict
Posts: 261
Karma: 110864
Join Date: Mar 2013
Location: Bordeaux, France
Device: Kobo Glo, Aura HD, kindle paperwhite
|
Hi Lucas,
Yes, already had a lot of fun with footnotes https://www.mobileread.com/forums/sho...d.php?t=212455 I keep you informed if I find a way to do it. François |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Javascript in ePub. | Vijay | ePub | 22 | 12-28-2023 09:43 AM |
Embedded interactive JavaScript in EPUB for iPad | amherst | ePub | 9 | 11-14-2012 07:41 AM |
Javascript in ePub | Techno4 | ePub | 9 | 11-05-2012 12:50 PM |
question regarding javascript and html in epub output | whol019 | ePub | 3 | 05-16-2012 01:51 PM |
epub et javascript | zelda_pinwheel | Software | 9 | 12-09-2010 04:56 PM |