user3169276
user3169276

Reputation: 1

syntax error in jquery.min.js (var f=b.call(a,c))

All, I use the jquery.min.js lib to have a rotating image on my website. In fact it uses 2 JS files:

  1. ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
  2. jquery.cycle.all.js

The code looks on my page looks like this:

<script language="javascript">
$(document).ready(function(){
$('#slider1') .cycle({
    fx: 'fade', //'scrollLeft,scrollDown,scrollRight,scrollUp',blindX, blindY, blindZ, cover, curtainX, curtainY, fade, fadeZoom, growX, growY, none, scrollUp,scrollDown,scrollLeft,scrollRight,scrollHorz,scrollVert,shuffle,slideX,slideY,toss,turnUp,turnDown,turnLeft,turnRight,uncover,ipe ,zoom
    speed:  'slow', 
    timeout: 5000 
});
}); 
</script>

Running the code throws a syntax error in Jquery.min.js at the following statement "var f=b.call(a,c);" causing my other JavaScript code not to run properly anymore...

I have no idea where to start looking for the problem.. Anyone any idea how to solve this ??

Upvotes: 0

Views: 1595

Answers (2)

MonkeyZeus
MonkeyZeus

Reputation: 20757

You have a space where it shouldn't be:

<script language="javascript">
$(document).ready(function () {
    $('#slider1')/* SPACE HERE */.cycle({
        fx: 'fade',
        speed: 'slow',
        timeout: 5000
    });
}); 
</script>

Upvotes: 0

Yunus Aslam
Yunus Aslam

Reputation: 2466

Most probably its a case of conflicts.

Instead of your first js file use this

src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"

Upvotes: 0

Related Questions