Domanda

I have a jQuery slider (carousel) on my index page that when I add in it Dreamweaver, it seems to check fine and it functions properly even when I preview in the browsers.

When I upload my site to the server (see here), everything works except the slider. There is an empty blank space with my left/right arrows, but that's all.

I ran the console in Chrome, and it gives me this error:

Uncaught TypeError: Object [object Object] has no method 'featureCarousel' (index):64
(anonymous function) (index):64
n jquery-1.7.min.js:2
o.fireWith jquery-1.7.min.js:2
e.extend.ready jquery-1.7.min.js:2
c.addEventListener.C

Which snippet of code should I post here so you can have a better understanding?

I need to mention that, for the main frame of my site, I am using a responsive grid system that also needs .js to work. Do you think there is a conflict of some sort here?

È stato utile?

Soluzione

Your problem is you are actually importing jQuery twice! Once in the <head>:

<script src="scripts/js/jquery-1.7.min.js" type="text/javascript" charset="utf-8"></script>

AND once on the bottom of the page:

<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')</script>

You need to remove the one at the bottom of the page. Please let me know if you have any questions and I will answer them the best I can!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top