Testcase for jQuery Ticket 7551

Burp. Just fixed the wrong coding issues

by jitter

HTML

<div class="radio" id="show-ex">
    <label>Yes<input type="radio" name="expectation" value="yes"/></label>
    <label>No<input type="radio" name="expectation" value="no"/></label>
</div>
<div id="ex-show">FOO</div>
<div class="radio" id="show-ri">
    <label>Yes<input type="radio" name="rights" value="yes"/></label>
    <label>No<input type="radio" name="rights" value="no"/></label>
</div>
<div id="ri-show">BLAH</div>

JavaScript

var ex = $('#ex-show').css('display', 'none'),
    ri = $('#ri-show').css('display', 'none');

$('#show-ex').change(function() {
    if ($("input[name='expectation']:checked").val() == 'yes') {
        ex.show(500);
    } else {
        ex.hide(500);
    }
});

$('#show-ri').change(function() {
    if ($("input[name='rights']:checked").val() == 'no') {
        ri.show(500);
    } else {
        ri.hide(500);
    }
});