Grow your CSS skills. Land your dream job.

Clicking radio button sends to top of page

  • # January 28, 2013 at 5:06 pm

    I have a form with some radio buttons setup, I’m having an issue that when you make a selection it scrolls the page to the top. It seems to be happening just in FF and Opera.

    It’s not adding an id to the url or anything, it just scrolls to the top. I can’t figure out what’s going on with it.

    Any ideas?

    http://mercedesbenzsanjuan.com/home/

    # January 28, 2013 at 5:47 pm

    Looks like in your gravityforms.js has some window scroll to top functions, line 485: scrollTop = $window.scrollTop();

    Unless you feel like debuging tons of js maybe try a different script

    # January 28, 2013 at 5:59 pm

    Ahh… thanks, it’s actually in jquery.colorbox.js. I’m not sure why they’re using that. I’m going to play around with it a bit and see if I can make some adjustments to it.

    # January 28, 2013 at 6:13 pm

    I don’t think that’s the problem, I completely removed jquery.colorbox.js and it’s still happening.

    The only other reference to scrolltop I could find is in admin-bar.js and that’s not loaded unless someone is logged in.

    I guess I’ll keep digging.

    # February 1, 2013 at 10:27 am

    Ok, so I figured it out. This was a CSS problem. I was removing the inputs for the radio buttons by positioning them off of the screen instead of just hiding them with visibility.

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

You must be logged in to reply to this topic.

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