Grow your CSS skills. Land your dream job.

jQuery animated horizontal list, little help needed

  • # May 6, 2009 at 1:24 pm

    Hello,

    I’m really newbie to JavaScript, so this is really basic.

    See example list here.

    If I ad the height of the li element, it ads the height in the bottom and my background images stay still. If I ad the margin to the top it works nice but it ads the margin to the top :) I would just like the li element to increase in height so that the backround image would move with it. You guys have any idea how would I achieve this?

    All help is tremendously appreciated!

    Thanks.

    # May 6, 2009 at 2:32 pm

    If you want the bus to come, just light a cigarette. Or to solve a problem, post it to forum :)

    I made a longer BG-image and positioned it to the bottom and increased the height. See it here (test2).

    I bet it could be cleaner and better… Suggestions?

    If JavaScript is disabled, how do I get it to fall back to the normal css based navigation? See what I mean hear (only-css).

    Here’s the JavaScript so far:

    Code:
    $(function() {

    $(‘.page_item a’).hover(function() {

    $(this).animate({
    height: “175px”

    },{queue:false, duration:70});

    }, function() {

    $(this).stop().animate({
    height: “135px”

    },{queue:false, duration:70});
    });
    });

    Thanks!!

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

You must be logged in to reply to this topic.

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