Use jquery to show only the current option selected in the form
<p>I am very new to jquery.</p>

<p>Here is my code </p>

<pre><code>&lt;script&gt;
$(document).ready(function(){
    $('#bashing_title').change(function(){
        if($(this).val() == 1)
        $('#1').show();
        else if($(this).val() == 2)
        $('#2').show();
        else if($(this).val() == 3)
        $('#3').show();
        else if($(this).val() == 4)
        $('#4').show();
        else if($(this).val() == 5)
        $('#5').show();
        else if($(this).val() == 6)
        $('#6').show();
        else if($(this).val() == 7)
        $('#7').show();
        else if($(this).val() == 8)
        $('#8').show();
        else if($(this).val() == 9)
        $('#9').show();

        else
        $('#1').hide();
    });
});

&lt;/script&gt;
</code></pre>

<p>What I am trying to do is if the value is <code>1</code> it shows a specific text box, if its 2 then another one and so on. But here if the user has selected the option with value <code>1</code> at first and if the user selects <code>2</code> later, the one doesnt gets hidden.</p>

<p>how do i hide the previous value and only show the value that is curretly selection</p>
