suttercain Posted June 16, 2010 Share Posted June 16, 2010 Hi everyone, I need to be able to show a new form field based on an option selected in the select menu. The show works fine, but when I select another option the revealed form field (div) won't hide. Any ideas? <script type="text/javascript"> $(document).ready(function(){ $("#parent1").css("display","none"); $("#reveal_add").click(function(){ if ($('option[name=add_mfr]:selected').val() == "add_new" ) { $("#parent1").slideDown("fast"); //Slide Down Effect } else { $("#parent1").slideUp("fast"); //Slide Up Effect } }); }); </script> Quote Link to comment Share on other sites More sharing options...
haku Posted June 17, 2010 Share Posted June 17, 2010 Need to see the HTML for DOM manipulation questions. Quote Link to comment Share on other sites More sharing options...
ditsayakul Posted June 22, 2010 Share Posted June 22, 2010 Hi suttercain, Today I need same. long time search engine I found this topic on link http://www.onextrapixel.com/2009/10/13/how-to-display-form-fields-based-on-selection-with-or-without-jquery-cookie/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.