Search code examples
jqueryundefinedundefined-function

type issue undefined is not a function


I've got an issue that I just don't understand as I'm a newbie. I'm running a jquery plugin on a wordpress site and since upgrading wordpress to the latest version, the jquery plugin doesn't work (http://caroufredsel.dev7studios.com).

I get the following error whenever the slider tries to fire: type issue 'undefined' is not a function (evaluating 'c_old.last()')

Can anyone take a look, I've tried upgrading jquery and the plugin to the latest and still the same issue occurs.

Here's the site is anyone would like to help me out: http://asccs.qc.ca

It's on the home page, #lesArticles

worse part is, I got it to work locally but not on the server.

Thanks in advance.


Solution

  • although you include jQuery 1.9.1 within your head, your jQuery ends up being jQuery 1.2.6 because another included script overwrites your jQuery. To prove that, type the following in the console:

    jQuery.fn.jquery
    

    It will respond with "1.2.6". You see the error because the last() function on a jQuery object is not defined in jQuery version 1.2.6.

    To resolve the issue, try including

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js?ver=1.9.1">
    

    right before you include

    <script src="http://asccs.qc.ca/wp-content/themes/asccs/js/jquery.carouFredSel-6.2.0.js">