1

I have multiple javascript files and everything works great(a few functions that add styles to elements and stuff like that), but when I try to add: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>, only thing that works is twitter feed.

This what I have in head tag:

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="js.js"></script>
    <link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:300' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="style.css">
    <!-- nivoSlider -->
    <link rel="stylesheet" href="nivoSlider/nivo-slider.css" type="text/css" media="screen">
    <script src="nivoSlider/jquery.nivo.slider.pack.js" type="text/javascript"></script>
    <!-- fancyBox -->
    <script type="text/javascript" src="fancyBox/jquery.fancybox.js?v=2.1.4"></script>
    <link rel="stylesheet" type="text/css" href="fancyBox/jquery.fancybox.css?v=2.1.4" media="screen">
    <script type="text/javascript" src="fancyBox/fancybox.js"></script>
    <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
    <!-- twitter -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"                                         type="text/javascript"></script>
    <script src="twitter.js" type="text/javascript"></script>
    <title>LEFT</title>
    </head>

I used this tutorial, so that is all code I have for twitter feed.

I dont't know what else I should copy here for someone to understand my problem ;D

2
  • Why are you trying to include that script? Commented Feb 13, 2013 at 13:57
  • Because I need it for twitter feed. Commented Feb 13, 2013 at 14:01

3 Answers 3

3

Well, it looks like you are importing jQuery twice, once at the top and once near the end, which could lead to some pretty nasty javascript conflicts. Loading it once should suffice.

Sign up to request clarification or add additional context in comments.

1 Comment

seems to me this is the answer, replace one above with new one, not just a new one.
2

Include jquery before the other scripts ?

4 Comments

I have it in third line (<script type="text/javascript" src="jquery.js"></script>)
but you are adding it again later with <script src="ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", that is the problem
As @Andreas-carlbom sad your importing jquery twice on your page. If your twitter feed does not work then it's another problem. It could be the jquery version. you have jQuery v1.9 at the top and include jQuery v1.6 from google api
ok, I delete jquery v1.6, but what causes twitter feed to not work ?
-1

After using and adding elements via Ajax you need to rebimd http://api.jquery.com/bind/

The reason is explained here jQuery elements inside a jQuery dialog stop working after ajax call

:)

2 Comments

True, but that's not the problem here
Oh my apologies lol I've read about 4 of the same questions. What dose the fire bug console output ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.