Grow your CSS skills. Land your dream job.

[SOLVED] jQuery not working at all!

  • Bob
    # October 17, 2011 at 8:20 am

    Hi,

    I’m just starting to learn jQuery actually.. I downloaded the starterkit, unpacked it and also downloaded the latest jQuery file from jquery.com.. all referenced to with the right path in the file but for some reason it doesn’t work! I also tried the link to the jQuery file on Google but still the same problem.. I know the path is right because when I view source and click on the link, the right file opens.

    If I click the ‘Run Code’ button on the homepage of jQuery.com it does what it’s supposed to do, just on my own computer nothing works?! I tried different browsers but that doesnt help either.

    Any ideas?

    # October 17, 2011 at 8:22 am

    Post your source code?

    Or, uses your browsers debugging tools and view the console. It’ll tell you what’s causing the error

    Bob
    # October 17, 2011 at 8:35 am

    The code is too long to post, but it’s just the starterkit file taken directly from http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery. And the jquery.js file I link to is just the jQuery file I downloaded from jQuery.com – I don’t suppose I should post that here either.

    I tried using the console but no errors showed up.

    # October 17, 2011 at 8:41 am

    Well without the source code we’ll just be guessing… Doesn’t matter how long it is, there is very little we can do to help without the code. Can you post your source code along with what you expect it to be doing.

    Cheers

    Bob
    # October 17, 2011 at 8:49 am

    First part:

    < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">











    jQuery Starterkit


    This page contains code to test the examples. Most of it is only relevant for a example.



    Some link



    Go to bottom







    1. First element

    2. Second element

    3. Third element




    1. First element, second list

    2. Second element, second list

    3. Third element, second list

    4. Li with child ul

      • Child One

      • child two





    Container


    Reset!


    Form 1





    Form 2





    Form 3




    Bird FAQ - click the questions to show the answers



    What shouldn't I do to the bird?

    Never use oils or lotions which contain oils on your bird. They gunk up the feathers,
    and ruin their insulating properties. This means a chilled bird. Never wait out a cat bite--those
    require immediate veterinary attention--a bird can die within two days because a cat's mouth is so
    filthy and full of bacteria. Don't bother with over-the-counter medication. It really doesn't work,
    and in some cases, may upset the delicate bacterial balance in the bird's body, or even worsen the
    situation. Never try to treat a fracture at home.


    My bird is healthy. I don't need to go to a vet, do I?

    Schedule a "well-bird" checkup. Prevention is the best medicine. Even though the bird might appear outwardly healthy, it may have a low-grade infection or something not so readily apparent. Your bird's health and your peace of mind will be worth it.


    My bird's leg is being rubbed raw by the leg band. Can I take it off?

    No. Don't attempt this, especially if the leg is broken or swollen. The vet will be able
    to remove the band, and deal with whatever injury maybe lurking under the banded area.


    How do I pull a broken blood feather?

    This is probably the most common mishap. The remedy is simple--yank! It's most easily done
    with two people. One to restrain the bird and the other to pull the feather. Use pliers, or a
    hemostat. Tweezers won't work on primaries. Make certain that the wing bones are firmly supported
    or you can break the wing. Clamp onto the feather and give a sharp tug in the direction of the
    feather. The feather will come out. Next, apply gentle, direct pressure to the follicle where the
    feather was to stop the bleeding. Dab some styptic powder on it, as it will help stop the bleeding
    as well. Let the bird rest. Ask your vet or breeder to demonstrate exactly how to pull a blood
    feather if you're apprehensive about doing it.



    This is probably the most common mishap. The remedy is simple--yank! It's most easily done
    with two people. One to restrain the bird and the This is a link. Hover me to
    highlight the parent paragraph.
    other to pull the feather. Use pliers, or a hemostat. Tweezers won't
    work on primaries. Make certain that the wing bones are firmly supported or you can break the wing.
    Clamp onto the feather and give a sharp tug in the direction of the feather. The feather will come
    out. Next, apply gentle, direct pressure to the follicle where the feather was to stop the bleeding.
    Dab some styptic powder on it, as it will help stop the bleeding as well. Let the bird rest. Ask
    your vet or breeder to demonstrate exactly how to pull a blood feather if you're apprehensive about
    doing it.



    This is probably the most common mishap. The remedy is simple--yank! It's most easily done
    with two people. One to restrain the bird and the This is a link. Hover me to
    highlight the parent paragraph.
    other to pull the feather. Use pliers, or a hemostat. Tweezers won't
    work on primaries. Make certain that the wing bones are firmly supported or you can break the wing.
    Clamp onto the feather and give a sharp tug in the direction of the feather. The feather will come
    out. Next, apply gentle, direct pressure to the follicle where the feather was to stop the bleeding.
    Dab some styptic powder on it, as it will help stop the bleeding as well. Let the bird rest. Ask
    your vet or breeder to demonstrate exactly how to pull a blood feather if you're apprehensive about
    doing it.

    Bob
    # October 17, 2011 at 8:51 am

    Second part:

    jQuery Tablekit






























































































































































































































































































































































































































































    Email Id Phone Total Ip Url Time ISO Date UK Date
    devo@flexomat.com 66672 941-964-8535 $2482.79 172.78.200.124 http://gmail.com 15:10 1988/12/14 14/12/1988
    henry@mountdev.net 35889 941-964-9543 $2776.09 119.232.182.142 http://www.gmail.com 3:54 1974/1/19 19/1/1974
    christian@reno.gov 60021 941-964-5617 $2743.41 167.209.64.181 http://www.dotnet.ca 10:58 2000/3/25 25/3/2000
    muffins@donuts.com 17927 941-964-9511 $2998.18 210.214.231.182 http://google.se 21:22 1993/1/24 24/1/1993
    muffins@reno.gov 76375 941-964-2757 $1836.09 220.222.93.171 http://www.samba.org 15:22 1988/4/4 4/4/1988
    mendez@gmail.com 45834 941-964-2575 $2805.46 228.170.245.253 http://flexomat.com 11:31 1975/12/12 12/12/1975
    dev@gmail.com 20022 941-964-4967 $3296.54 175.248.70.240 http://www.flexomat.com 4:27 2002/7/3 3/7/2002
    foo@polyester.se 55977 941-964-745 $2953.73 222.114.227.156 http://www.donuts.com 23:49 1977/8/4 4/8/1977
    adam@aftonbladet.se 38867 941-964-6302 $1949.27 116.241.143.196 http://flexomat.com 23:35 1995/7/27 27/7/1995
    devo@donuts.com 51426 941-964-1234 $1067.00 88.96.149.82 http://www.polyester.se 15:17 1986/1/5 5/1/1986
    henry@samba.org 40859 941-964-4856 $3401.19 68.152.250.74 http://www.flexomat.com 4:36 1990/3/7 7/3/1990
    found@dotnet.ca 23986 941-964-2686 $1393.52 98.102.181.138 http://lostnfound.org 5:51 1993/7/22 22/7/1993
    carl@fish.org 73392 941-964-5792 $3876.04 246.234.182.243 http://www.google.se 6:52 1984/7/14 14/7/1984
    found@mountdev.net 03519 941-964-1599 $1176.48 104.212.122.177 http://donuts.com 18:52 2000/8/6 6/8/2000
    lost@fish.org 36628 941-964-5975 $822.23 153.63.68.208 http://www.gmail.com 7:53 1994/7/14 14/7/1994
    mendez@dotnet.ca 90442 941-964-1649 $1975.72 128.161.95.170 http://reno.gov 8:35 1997/10/20 20/10/1997
    carl@donuts.com 00412 941-964-6432 $1834.77 141.231.126.192 http://gmail.com 16:15 1997/8/23 23/8/1997
    foo@fish.org 80653 941-964-1022 $260.26 98.102.97.81 http://samba.org 8:27 1991/11/24 24/11/1991
    found@fish.org 54635 941-964-6439 $1442.80 108.133.231.154 http://dotnet.ca 6:47 1977/7/12 12/7/1977
    found@flexomat.com 20953 941-964-5544 $575.42 247.246.235.138 http://gmail.com 3:12 1978/6/10 10/6/1978
    lost@aftonbladet.se 60810 941-964-8406 $1054.39 130.80.125.154 http://www.samba.org 15:50 1978/5/18 18/5/1978
    carl@reno.gov 22666 941-964-104 $373.59 185.150.127.115 http://www.lostnfound.org 10:11 1971/11/5 5/11/1971
    carl@donuts.com 82867 941-964-1031 $631.03 62.244.222.152 http://www.reno.gov 11:24 1985/1/22 22/1/1985
    foo@donuts.com 11268 941-964-208 $3730.64 234.192.138.252 http://aftonbladet.se 22:45 1979/8/4 4/8/1979
    devo@google.se 17059 941-964-2903 $1404.67 73.189.246.202 http://www.gmail.com 22:28 1983/4/28 28/4/1983
    muffins@flexomat.com 90584 941-964-4640 $3706.01 243.162.73.115 http://www.fish.org 11:12 1997/4/8 8/4/1997
    foo@samba.org 82966 941-964-7245 $1001.38 255.182.148.252 http://www.reno.gov 8:42 1995/11/1 1/11/1995
    foo@reno.gov 03603 941-964-8942 $1677.07 176.96.162.192 http://www.flexomat.com 19:11 1980/7/31 31/7/1980
    Bob
    # October 17, 2011 at 8:55 am

    And last part:

    	
    found@flexomat.com

    84939
    941-964-7004
    $3916.83

    240.145.198.78
    http://www.fish.org
    1:29

    1980/8/26
    26/8/1980




    henry@lostnfound.org
    76453
    941-964-3084

    $3875.88
    235.225.168.168

    http://www.fish.org
    15:31
    2000/10/22
    22/10/2000





    sam@aftonbladet.se
    36274
    941-964-7784
    $73.43
    114.190.194.148

    http://www.dn.se

    18:24
    1994/11/11
    11/11/1994



    dev@polyester.se

    15971
    941-964-7527
    $1855.18
    179.121.143.189
    http://www.flexomat.com
    10:25

    1984/8/16
    16/8/1984



    devo@fish.org
    31734

    941-964-9760

    $3201.35
    213.186.220.205
    http://www.samba.org
    19:37
    1979/3/4

    4/3/1979




    devo@reno.gov
    52074
    941-964-2068

    $3035.24
    189.62.225.163

    http://www.dn.se
    21:18
    1998/2/24
    24/2/1998




    mendez@fish.org

    87800
    941-964-7933
    $618.59

    254.119.153.91
    http://www.dn.se
    22:34

    1979/5/28
    28/5/1979




    muffins@reno.gov
    95926
    941-964-147

    $3897.91
    105.85.121.209

    http://www.flexomat.com
    9:50
    2003/4/1
    1/4/2003





    carl@donuts.com
    74513
    941-964-4507
    $2150.68
    106.175.123.125

    http://www.fish.org

    21:42
    1977/4/8
    8/4/1977



    sam@fish.org

    82420
    941-964-2134
    $3947.54
    129.78.102.122
    http://mountdev.net
    11:33

    1990/11/26
    26/11/1990



    devo@mountdev.net
    81905

    941-964-3535

    $722.17
    229.101.84.111
    http://fish.org
    7:29
    1975/12/28

    28/12/1975




    john@lostnfound.org
    93124
    941-964-1508

    $394.82
    61.184.235.77

    http://www.mountdev.net
    14:38
    1979/12/10
    10/12/1979







    Go to top



    # October 17, 2011 at 9:12 am

    Just a tip, we don’t really need the HTML. What matters the most right now is the jQuery that you are trying to run.

    # October 17, 2011 at 9:20 am

    And what have you put in your custom.js? Everything else is irrelevant as the custom.js file is where you tell JQuery to do something

    Bob
    # October 17, 2011 at 9:24 am

    Ofcourse, you’re right.

    I took this example from the jquery website but for me it does’t work:




    This is the paragraph to end all paragraphs. You
    should feel lucky to have seen such a paragraph in
    your life. Congratulations!





    Bob
    # October 17, 2011 at 9:28 am

    Yeah actually I didn’t put anything in my custom.js file, I had it right in my html document but forgot to paste it in my above posts..

    For some reason though, it is working now! I have no idea how or why that happened, I don’t believe I changed anything really.. but the good thing is, it is working now! So thanks @TT_Mark and @BoringCode.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".