Grow your CSS skills. Land your dream job.

hoverflow/jquery animation question

  • # February 23, 2011 at 6:15 pm

    I’m trying to get my sprite to animate a move left on hover, whilst text that overlays that image to go right

    So far, I can only target the “a” tag, and the child “p” moves with it

    My Markup

    My js function works to send both in the same direction

    $(function() {

    $("nav.mainNav a").hover(function(e) {

    $(this)
    .hoverFlow(e.type, { opacity: 1, left:'-2%'}, 500)
    .css('overflow', 'visible')

    }, function(e) {

    $(this)
    .hoverFlow(e.type, { opacity: 0.7, left: '0%'}, 500)
    .css('overflow', 'visible')

    });

    })

    Am I barking up the wrong tree in trying to get this

    tag to shift?

    # February 23, 2011 at 7:30 pm

    ok – fixed it by adding ‘padding-left’

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".