[annotator-dev] n00b question: Using annotator with other plugins

Pankaj Raut rautpankaj at gmail.com
Fri Jan 27 07:43:38 UTC 2012


Hi,

I am a newbie at Jquery/JS and I am trying to use annotator with another
javascript plugin called Booklet(http://builtbywill.com/code/booklet/). The
idea is to make a flipbook kind of reading interface which allows the user
to annotate as well.

The problem is that the first plugin which is added is the one which works
while the other does not. So if I add the annotator plugin is loaded first,
I can annotate content but cannot get the flipbook effect and vice-versa. I
have pasted the code segment below:

  if (typeof $().annotator !== 'function') {
          alert("Ooops! it looks like you haven't built the annotator
concatenation file. " +
                "Either download a tagged release from GitHub, or modify
the Rakefile to point " +
                "at your copy of the YUI compressor and run `rake
package`.");
        } else {
          // This is the important bit: how to create the annotator and add
          // plugins
   //Adding annotator plugin
  $('#mybook').annotator();
      //adding booklet plugin
          $('#mybook').booklet({
 width:'80%',
  height:550,
menu: '#custom-menu',
chapterSelector: true,
covers:true,
closed:true,
autoCenter:true,
overlays: false,
arrows: true,
        arrowsHide: true,
hash: true,
next: '#custom-next',
prev: '#custom-prev'
});

'mybook' is a div element I have created to hold the contents of the
flipbook.

Can anyone help me out in this? I have been trying things for quite some
time without any luck. Also this is the first time I am posting to a
mailing list, so I apologize if I have broken any conventions of mailing.

Thanks,
Pankaj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20120127/59fb15ed/attachment-0002.html>


More information about the annotator-dev mailing list