0

I'm trying to put the jQuery Booklet plugin on a site that uses the 1.3.2 library - I can't remove this reference or upgrade. I have successfully used noConflict in the past with other plugins that require a newer version of jQuery on this site.

When I test locally and include the 1.3.2 reference, Firebug console tells me:

but the book still loads correctly and functions. Not sure what that error means. When I put the code onto my development site, the images in the book appear one stacked on top of the other, navigation buttons are missing, and I see an error in the Firebug console that says

TypeError: p2.offset(...) is undefined [Break On This Error]
p2.offset().left + pWidth - hoverFullWidth,

In IE it tells me: SCRIPT5007: Unable to get property 'left' of undefined or null reference jquery.booklet.latest.js, line 1205 character 2

This is the code in question, part of jquery.booklet.latest.js

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

Something isn't loading correctly. The scripts look like this in my page in my development environment:

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js" type="text/javascript"></script>  
        <script src="/wcsstore/CVWEB/images/home/js/jquery.easing.1.3.js" type="text/javascript"></script>
        <script src="/wcsstore/CVWEB/images/home/js/jquery.booklet.latest.js" type="text/javascript"></script>
        <link href="/opencms/opencms/CVWEB/css/jquery.booklet.latest.css" type="text/css" rel="stylesheet" media="screen, projection, tv" />
        <script type="text/javascript">
        var $j = jQuery.noConflict(true);
            $j(document).ready(function(){          
                $j(function () {        
                    $j("#mybook").booklet();
                });
            });
        </script>

Is there something extra I need to do with noConflict since there are so many other scripts? Do I need to modify the jquery.booklet.latest.js file to include noConflict somehow? I tried declaring the variable and replacing $ like above but that didn't do anything.

I looked here and here to try to solve the easing error, but I am already including all the correct scripts.

I tried the solution here of using jQuery instead of $ with no luck.

I'm still pretty green when it comes to jQuery so any help is appreciated. Thank you.

I am about to move on to a different option but wanted to post here so I can learn what the problem is.

Community
  • 1
  • 1
surfbird0713
  • 1,209
  • 2
  • 23
  • 45

1 Answers1

0

It must be your incomplete src location. It should be something like this, as if running from localhost:

    <script src="http://localhost/wcsstore/CVWEB/images/home/js/jquery.easing.1.3.js" type="text/javascript"></script>
Akira Kronic
  • 164
  • 1
  • 12