Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    79
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Is Not a Function Errors

    Hi all. Ive been having these problems since I built this site. Im constantly having jQuery is not a function errors. For example, on this page, http://www.thebookplace.org/photo-gallery, something is causing the lightbox to not work. This isn't the only place it happens. Thanks for any help in pointing me in the right direction.

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    The error I see on that page is:

    jQuery("#dialog").dialog is not a function

    which suggests jQuery UI is not loaded.

    Looking through all the scripts you have both:

    Code:
    	<!-- Catalog Search Scripts -->
    	<script src="http://thebookplace.org/wp-content/themes/reverie/js/catalog-search.js"></script>
    	<script src="http://thebookplace.org/wp-content/themes/reverie/js/jquery-ui-1.8.18.custom.min.js"></script>
    and

    Code:
    					<label id="reg_passmail">A password will be e-mailed to you.</label>
    					<input type="submit" name="wp-submit" id="wp-submit" value="Register" class="bt_register" />
    				</form>
    				</div>
    </div>
    <script type='text/javascript' src='http://thebookplace.org/wp-includes/js/jquery/ui/jquery.ui.core.min.js?ver=1.8.16'></script>
    I'd guess that these two versions of jQuery UI are conflicting - I'd suggest loading the full version in the <head> after loading jQuery, and giving it another try.

    PS: You have this line within app.js which may also be causing some problems where the browser has no console:

    Code:
    console.log($(window).width());
    Last edited by SB65; 06-07-2012 at 08:04 AM.

  • Users who have thanked SB65 for this post:

    Muckiem14 (06-07-2012)

  • #3
    New Coder
    Join Date
    Jun 2007
    Posts
    79
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Thanks for the help. I havent been able to locate what is adding the other jquery. I did however rename that particular jquery file so that it wasnt there when called upon and i still received the same errors.

    I did however notice that in this file:

    http://thebookplace.org/wp-content/t.../foundation.js

    jQuery seems to be added to the top. When I remove that code, my lightbox begins working but then i start receiving errors elsewhere. Like the slideshow on the homepage stops working. I know its a bunch of conflicts but I don't know how to remedy it.

    Thanks again for your reply.

  • #4
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Just to be clear, jQuery and jQuery UI are two different files. You need one, and only one, of each file. Apologies if I'm stating the obvious, but your last post talks about jQuery whereas the original problem relates the absence of jQuery UI.

    I'd guess that your plugins are trying to load extra versions of jQuery or jQuery UI and that's the problem.

    To troubleshoot, I'd recommend deactivating all of your plugins, then reactivating one by one and testing at each stage. That should help you home in on what's causing the problem.

  • #5
    New Coder
    Join Date
    Jun 2007
    Posts
    79
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Right, I understand the that the UI and jQuery are different scripts. I just screwed up the last post I suppose. Thanks for clearing up that I only need one of each though. It seemed logical that different versions or multiple copies being loaded would cause conflict.

    which suggests jQuery UI is not loaded.
    The jQuery UI is loaded and working on the homepage and other areas of the site even with the jQuery("#dialog").dialog is not a function error.

    Im trying to locate the source of the last jQuery UI but its a pain.

  • #6
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Looking at the two versions of jQuery UI you have, as per my first post, the "custom" version looks completely commented out, and the other is just the core, and doesn't include the widgets (like dialog). That seems consistent with what you're seeing.

    (If you can remove both these calls, then you can use a CDN to deliver jQuery UI - I always find that best for 99% of sites - see here for details.)

  • #7
    New Coder
    Join Date
    Jun 2007
    Posts
    79
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Ok I seemed to have taken care of the dialog and other errors. This is killing me though. Id really appreciate your thoughts.

    http://thebookplace.org/photo-galler...ead-kickoff-2/

    jQuery("a[rel=85858142026_390693]").fancybox is not a function

    However, when I edit this file

    http://thebookplace.org/wp-content/t.../foundation.js

    and remove everything above

    /*
    * jQuery Reveal Plugin 1.0

    The fancybox works and the error is gone. But, that makes the jquery on the homepage stop working. Any ideas?

  • #8
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    OK, well that file is including jQuery as well, so it looks as though that second inclusion is causing fancybox problems.

    What errors are generated on the home page when you make the amendment you describe?

    It looks like all that might fail on the home page is just a simple crossfade slider. You've also got nextgen gallery loaded - could this be used for the homepage in place of the foundation.js code - it includes the cycle plugin I think? This would allow you to remove foundation.js entirely.

  • Users who have thanked SB65 for this post:

    Muckiem14 (06-12-2012)

  • #9
    New Coder
    Join Date
    Jun 2007
    Posts
    79
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Thanks so much SB65. I have all of the javascript issues worked out now. It was a combination of noconflict, too many instances of jQuery, as well as just too many different Javascript files making it hard to isolate problems. All is well and thanks again for your help.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •