Jordy Pouw
Jordy Pouw

Reputation: 3

Uncaught TypeError: Object [object Object] has no method 'wipetouch'

I'm trying to integrate the wipetouch plugin into my portfolio http://www.i-jp.nl, for now without success.

Chrome gives me the following error:

Uncaught TypeError: Object [object Object] has no method 'wipetouch'

I can't figure out the problem. Here is the code which calls wipetouch, this is located in slider.js:

$(document).wipetouch({
                wipeLeft: function(result) { 
                    //if (slide >= 0 && slide < 3){
                        //$(".slider").animate({"right": "+=320px"}, "slow");
                        //slide = slide + 1;
                    //};
                    alert('test');
                },
            });

Upvotes: 0

Views: 885

Answers (1)

Undefined
Undefined

Reputation: 11431

You have jQuery loading twice. This is causing the problem with the wipetouch method not being available.

As for a fix. I would try removing the second jQuery file reference you have in your code.

Here is some more information courtesy of Felix Kling:

The problem is that you are loading two different jQuery versions, 1.8.0 and 1.7.2. The plugin attaches to jQuery.fn which is the 1.7.2 version, not $. Is see that the later included version (1.7.2) calls jQuery.noConflict();, which reverts the $ to point to the earlier included version.

You are first loading jQuery on line 11:

<script src="http://code.jquery.com/jquery-latest.js"></script>

Then again on line 18:

<script type='text/javascript' src='http://i-jp.nl/wp-includes/js/jquery/jquery.js?ver=1.7.2'></script>

Upvotes: 3

Related Questions