Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS So I watched the jQuery tutorial and can’t get it working

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23461
    red
    Member

    As the topic implies, I attempted to copy the code used in the tutorial video nearly to the letter in order to learn the basic functionality before venturing deeper into it.

    the site: http://koti.tamk.fi/~c7rnyber/random/sivusto.html
    the CSS: http://koti.tamk.fi/~c7rnyber/random/style.css

    Might be that I’ve become blind to the code, but for the love of god I cannot figure out whats wrong and why it does not work. If someone who knows about jQuery would take a moment to review (it’s relatively small file) and troubleshoot it to me, I’d be very grateful!

    #50705
    chazzwick
    Member

    It took a long time to spot, but i think this should be the right code:

    Code:
    $(document).ready(function(){

    $(“li.action-one”).click(function(){
    $(“div#page-wrap”).animate({
    width: “300px”
    });
    });

    $(“li.action-two”).click(function(){
    $(“p”).toggle();
    });

    $(“li.action-three”).click(function(){
    $(“#header”).slideUp();
    });

    });

    You have a few problems with wrong numbers of brackets. Have a look at this code, and yours. You must make sure that every open bracket gets closed.

    #50709
    red
    Member

    Indeed, love how blind I can be at times. :) Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.