Bear Bibeault wrote:Please read NotACodeMill.
jQuery is perfect for this type of thing. Give it a try and post with any problems you are having. But you write the code. We just help you with it.
One simple way is to set a "onClick" action for the "other" option and trigger the show function. The other options will equally need to trigger the JS by calling the hide function.
Bear Bibeault wrote:Two problems with this (and its counterpart) line: $('other').css('display', 'block');
Why are you not using .show() and .hide()? What is it that you think that your selector is matching?
Bear Bibeault wrote:More: on this line:
It's bad form to mix the styles in with the markup. Move the style info to a <style> element.
Bear Bibeault wrote:The most important question I asked is about the selectors. I ask again: do you really think that your selectors are selecting what you think they are selecting? Are you using the correct selector syntax?
Bear Bibeault wrote:
Now before you do one more line of coding, learn how to use the debugger in the browser! Do it now! It will save you hours and hours of time in the future.