Grow your CSS skills. Land your dream job.

outdated jQuery.

  • # July 16, 2013 at 2:31 pm

    So i wrote this jQuery code about a year ago maybe longer in jsfiddle

    http://jsfiddle.net/attilahajzer/X4FW3/

    and turns out its obsolete because when changing the source to ver. 2, the animation just hides the navigation and I’m having a tough time changing the code to today’s standards
    can somebody help?

    and would that be possible with css?

    # July 16, 2013 at 6:11 pm

    Using jQuery 2:

    http://jsfiddle.net/X4FW3/17/

    # July 16, 2013 at 6:31 pm

    Using CSS3 animations (and jQuery to add a class):

    http://jsfiddle.net/X4FW3/16/

    # July 17, 2013 at 10:30 pm

    As I know, since JQuery 1.9, they no longer support `.toggle()` event. If you want to create toggle event, try this way:

    var collapsed = true; // Variable to save the state
    $('#title').on("click", function() {
    if (collapsed === true) {
    alert('First toggle state.');
    collapsed = false;
    } else {
    alert('Second toggle state.');
    collapsed = true;
    }
    });

    Demo: http://jsfiddle.net/tovic/X4FW3/18/

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

You must be logged in to reply to this topic.

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