builtbywill / booklet

jQuery Plugin - display web content in a flipbook
http://builtbywill.com/booklet
Other
291 stars 109 forks source link

Change 'keyboard' option value #20

Closed Shyghar closed 10 years ago

Shyghar commented 11 years ago

Hi, I'm trying to change the 'keyboard' value bacause when I have colourbox (http://www.jacklmoore.com/colorbox/) open I want to navigate the overlays with the keyboard but I have to stop the page in background.

I wrote $(".gallery").colorbox({ onOpen:function(){ $('#mybook').booklet( "option", "keyboard", false ); }, onClosed:function(){ $('#mybook').booklet( "option", "keyboard", true ); } });

but didn't work. I tryed to call $('#mybook').booklet( "option", "keyboard", false); from the console and I have 'true' in response.

Debugging I see there is a problem in the if(typeof value !== 'undefined') for some reason 'value' is empty.

If I call $('#mybook').booklet( "option", "keyboard", true); it works.

I fixed it changin on line 2043 options[name] = value; in (value === 'false')? options[name] = false : options[name] = value; and I call $('#mybook').booklet( "option", "keyboard", "false");

These is another problem now: If I call $('#mybook').booklet( "option", "keyboard", true); I have Uncaught Error: Option "keyboard" does not exist on jQuery.booklet. error.

Did you test this call before? How can i fix it?