Grow your CSS skills. Land your dream job.

Jquery SlideDown not working in chrome

  • # July 16, 2013 at 3:12 pm

    I have a dropdown menu with a custom option that is suppose to make a textfield appear when chosen. The dropdown works in Safari but not Chrome. Any help? Below is a link to a codepen example.

    [http://codepen.io/anon/pen/abmvg](http://codepen.io/anon/pen/abmvg “http://codepen.io/anon/pen/abmvg”)

    Thank you

    # July 16, 2013 at 3:14 pm

    Works for me with a slight correction of the HTML:

    http://codepen.io/Paulie-D/pen/KGabr

    # July 16, 2013 at 3:39 pm

    I still don’t see it working in chrome, and as far as markup it passes w3validator. It works fine in Safari, it is just Chrome that is having issues.

    # July 16, 2013 at 3:53 pm

    @Paulie_D – your solution doesn’t work for me in Chrome.

    # July 16, 2013 at 3:57 pm

    Sorry, perhaps I misread the OP.

    What have noticed is that if I remove

    $(“.hiddenInput”).hide();

    It works properly except that the span is visible.

    http://codepen.io/Paulie-D/pen/sgjBk

    # July 16, 2013 at 4:00 pm

    You should use `change()` instead of `click()`

    [http://codepen.io/georgearnall/pen/qyoEm](http://codepen.io/georgearnall/pen/qyoEm “http://codepen.io/georgearnall/pen/qyoEm”)

    # July 16, 2013 at 4:03 pm

    I was thinking that but my JQ knowledge is limited to being aware of `change`.

    Pen updated. http://codepen.io/Paulie-D/pen/sgjBk

    I also was thinking that this

    if ($(“.customItemTogHidden”)[0].selectedIndex == 0)

    is **way** to specific.

    Couldn’t we do something based on the `value`rather than position in the stack.

    # July 16, 2013 at 4:04 pm

    such as this ? [http://codepen.io/georgearnall/pen/CAusD](http://codepen.io/georgearnall/pen/CAusD “http://codepen.io/georgearnall/pen/CAusD”)

    # July 16, 2013 at 4:06 pm

    Here ya go: http://codepen.io/ggilmore/pen/rEnJL

    # July 16, 2013 at 4:06 pm

    @georgearnall beat me to it!

    # July 16, 2013 at 4:07 pm

    @TheDoc I admit I had already experimented with that solution. When I noticed he was using click i abandoned it.

    # July 16, 2013 at 4:08 pm

    Neater guys….but now we have lost the SlideUp/Down

    # July 16, 2013 at 4:10 pm

    [http://codepen.io/georgearnall/pen/CAusD](http://codepen.io/georgearnall/pen/CAusD “http://codepen.io/georgearnall/pen/CAusD”)

    # July 16, 2013 at 4:12 pm

    Thank you guys for all your help. Not sure what was causing Chrome not to like the original method, but the other methods will work perfectly.

    # July 16, 2013 at 4:14 pm

    Almost….in the last Codepen there is no SlideUp.

    It’s something to do with the span being hidden or not.

Viewing 15 posts - 1 through 15 (of 22 total)

You must be logged in to reply to this topic.

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