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.
Works for me with a slight correction of the HTML:
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.
@Paulie_D – your solution doesn’t work for me in Chrome.
Sorry, perhaps I misread the OP.
What have noticed is that if I remove
It works properly except that the span is visible.
You should use `change()` instead of `click()`
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”).selectedIndex == 0)
is **way** to specific.
Couldn’t we do something based on the `value`rather than position in the stack.
such as this ? [http://codepen.io/georgearnall/pen/CAusD](http://codepen.io/georgearnall/pen/CAusD “http://codepen.io/georgearnall/pen/CAusD”)
Here ya go: http://codepen.io/ggilmore/pen/rEnJL
@georgearnall beat me to it!
@TheDoc I admit I had already experimented with that solution. When I noticed he was using click i abandoned it.
Neater guys….but now we have lost the SlideUp/Down
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.
Almost….in the last Codepen there is no SlideUp.
It’s something to do with the span being hidden or not.
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".