Anchor clicking doesn't trigger JQuery Code

1 post / 0 new

Hi!

I'm local-testing Readium with readium-js-viewer.

In a xhtml page, I have:

<a id="trigger" href="#elementTohide">Click me</a>

<div id="elementTohide">Element to hide</div>

and in file.js:

$(document).ready(function() {

$('#trigger').click(function(e) {

$(e.target.hash).hide();

})

})

It works as expected on iBooks (when I click the <a> I get the <div> hidden) but in Readium it simply reloads the page, even if I add "e.preventDefault()"

Any hint?

Many thanks,

Davide

Secondary menu