Checkbox - Compare Values From Selection
<p>How to compare values and show the output after making the selection on <code>checkbox</code>? I am using <strong>jQuery</strong> to do it. After selection had been made, it will not show the output. It will just show for first click only. Then, if we click again, the output will not be changed. Below is my code written so far,</p>

<p><strong>jQuery</strong></p>

<pre><code>$("input:checkbox").on('click', function() {
        var $box = $(this),
        $price = $( "input[name='price_range']:checked").val(),
        $nama_pemohon = "&lt;?php echo $nama_pemohon; ?&gt;", 
        $submited_id = &lt;?php echo $submited_id; ?&gt;,
        $jawatan_pemohon = "&lt;?php echo $jawatan_pemohon; ?&gt;",
        $jabatan_pemohon = "&lt;?php echo $jabatan_pemohon; ?&gt;",
        $submited_by = &lt;?php echo $submited_by; ?&gt;,
        $nama = "&lt;?php echo $nama; ?&gt;",
        $jawatan = "&lt;?php echo $jawatan; ?&gt;",
        $jabatan = "&lt;?php echo $jabatan; ?&gt;";

        if($price == "&lt; RM 10,000"){
            $("#submited_by option").val($submited_by).text($nama);
            $("#jawatan_pemohon").text($jawatan);
            $("#jabatan_pemohon").text($jabatan);
        } else {
            $("#submited_by option").val($submited_id).text($nama_pemohon);
            $("#jawatan_pemohon").text($jawatan_pemohon);
            $("#jabatan_pemohon").text($jabatan_pemohon);
        } 

});
</code></pre>

<p><strong>HTML</strong></p>

<pre><code>&lt;input type="checkbox" name="price_range" value="&lt; RM 10,000" class="checker"&gt; &lt; RM 10,000.00
&lt;input type="checkbox" name="price_range" value="&lt; RM 200,000" class="checker"&gt; &lt; RM 200,000.00

&lt;select name="submited_by" id="submited_by"&gt;
  &lt;option value="&lt;?php echo $submited_by; ?&gt;"&gt;&lt;?php echo $nama;?&gt;&lt;/option&gt;  
&lt;/select&gt;
</code></pre>