jquery doesnt load

Discussion in 'Programming' started by lew1s666, Oct 8, 2013.

  1. #1
    i have a website where i want to load this jquery from http://jsfiddle.net/lew1s/ewY6a/
    on this website http://projects.qbf.ie/bdmacmahon/team/ but doesnt load the jquery at all.

    i added these in to header:

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

    can you help me please ?
     
    lew1s666, Oct 8, 2013 IP
  2. malky66

    malky66 Acclaimed Member

    Messages:
    3,997
    Likes Received:
    2,248
    Best Answers:
    88
    Trophy Points:
    515
    #2
    malky66, Oct 8, 2013 IP
  3. lew1s666

    lew1s666 Member

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #3


    yes, but thats another jquery i am not using this . thast fine
     
    lew1s666, Oct 8, 2013 IP
  4. lew1s666

    lew1s666 Member

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #4
    i fixed it and stil the same. the jquery doesnt load on the wordpress site. i addded in to header ? do i have to add in functions .php?
     
    lew1s666, Oct 8, 2013 IP
  5. malky66

    malky66 Acclaimed Member

    Messages:
    3,997
    Likes Received:
    2,248
    Best Answers:
    88
    Trophy Points:
    515
    #5
    It's not fine, if you're not using it remove the link to it in the header.
    you are also loading jquery twice, which is the probable cause of your issue.
    once on line 12, and again on line 51
     
    malky66, Oct 8, 2013 IP
  6. lew1s666

    lew1s666 Member

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #6
    did. still not working :(
     
    lew1s666, Oct 8, 2013 IP
  7. lew1s666

    lew1s666 Member

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #7
    is this correct ?

    <script>



    $(
    $('.interactable').click(
    function()
    {
    $('.toggle').css('display', 'none');
    var clickedLink = $(this);
    $('#div'+clickedLink.data('id')).css('display', 'block');
    }
    )
    );
    </script >
     
    lew1s666, Oct 8, 2013 IP
  8. malky66

    malky66 Acclaimed Member

    Messages:
    3,997
    Likes Received:
    2,248
    Best Answers:
    88
    Trophy Points:
    515
    #8
    Developer tools is now showing
    I noticed you also also removed the jqueryui file, Try adding it back in and see what happens,
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
    Code (markup):
    add it after the jquery file on line 51
     
    malky66, Oct 8, 2013 IP
  9. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #9
    Look in the developer console. The error is staring you in the face (Uncaught ReferenceError: $ is not defined). It's an easy one to find in Google.
     
    ryan_uk, Oct 8, 2013 IP
  10. lew1s666

    lew1s666 Member

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #10
    so its a wrong code ot missing some jquery library ?
     
    lew1s666, Oct 8, 2013 IP
  11. lew1s666

    lew1s666 Member

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #11

    i did and now i have two error . :( i am lost
     
    lew1s666, Oct 8, 2013 IP
  12. malky66

    malky66 Acclaimed Member

    Messages:
    3,997
    Likes Received:
    2,248
    Best Answers:
    88
    Trophy Points:
    515
    #12
    You have added it before jquery is called, i said:
     
    malky66, Oct 8, 2013 IP
  13. malky66

    malky66 Acclaimed Member

    Messages:
    3,997
    Likes Received:
    2,248
    Best Answers:
    88
    Trophy Points:
    515
    #13
    also this code should be added after the html code, before the closing </body> tag
    <script>
    $(
    $('.interactable').click(
    function()
    {
    $('.toggle').css('display', 'none');
    var clickedLink = $(this);
    $('#div'+clickedLink.data('id')).css('display', 'block');
    }
    )
    );
    </script >
    
    Code (markup):
     
    malky66, Oct 8, 2013 IP
  14. lew1s666

    lew1s666 Member

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #14
    solved



    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

    $(document).ready(function() {

    // The below code was simply take from your provided example.
    $('.interactable').click(function() {
    $('.toggle').css('display', 'none');
    var clickedLink = $(this);
    $('#div'+clickedLink.data('id')).css('display', 'block');
    }
    );

    });
     
    lew1s666, Oct 8, 2013 IP