builtbywill / booklet

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

Server events causing booklet throw error : Unable to get property 'left' of undefined or null reference #36

Closed swapnatv closed 10 years ago

swapnatv commented 10 years ago

First of all thank u so much for such a great plugin. I have tried using this booklet plugin to load dynamic contents using Ajax. Need your help to solve one issue. The issue is that whenever there is a server side event occurring(say button click), I get an error:- Error: Unable to get property 'left' of undefined or null reference Error is thrown in booklet.latest.min.js

{aB.draggable({axis:"x",containment:[aH.offset().left,0,aD.offset().left+K-a1,y],drag:function

I am using master page. Jquery reference is thus made in master page only.Have downloaded the latest version of booklet also and tried. Please help if possible!

swapnatv commented 10 years ago

Hi,

Further to my investigation I would like to add that this error is thrown when option "Manual" is true as the error disappeared when I set it to false. Clear code where error is thrown is given below:-

if (options.manual) { // implement draggable forward p3.draggable({ axis: "x", containment: [ target.offset().left, 0, p2.offset().left + pWidth - hoverFullWidth, pHeight ],

swapnatv commented 10 years ago

Hi solved this issue... just added a simple line

if (options.manual) { if (target.offset().left) {