The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Animated show and hide within a show and hide?

  • # September 28, 2012 at 4:17 am

    Hello everyone!

    Bit of a newbie Jquery question here.

    So im trying to create a show/hide functionality on an element which is already in a show/hide function. I dont know how much sense that makes but probably not very much. Check out this fiddle. ( “JS fiddle”)

    I’ve managed to so far achieve the showing and hiding the main element. Please help. Ive been banging my head on this for a while :-(

    Thanks! =)

    # September 28, 2012 at 4:56 am

    This reply has been reported for inappropriate content.

    What exactly are you trying to do? When you click on what element do you want what to happen?

    # September 28, 2012 at 1:03 pm

    As you can read in the documentation of slideToggle, you’ve got a callback. You can use a callback to have an effect in and effect.

    So let’s say you want to slideToggle the main div and want the div within that div to be shown with the jQuery function show().

    That might look like this:

    On that way you can add a animation (or so) on a “moving” object. Is this what you meant?

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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed